bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20847: [display engine] 25.0.50; company-mode popup makes point jump


From: Dmitry Gutov
Subject: bug#20847: [display engine] 25.0.50; company-mode popup makes point jump to an entirely different location
Date: Sun, 21 Jun 2015 23:01:10 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0

On 06/21/2015 09:09 PM, Eli Zaretskii wrote:

No, I expect the cursor to be drawn on the fringe, like the user
expects.  (Or maybe I misunderstand what you meant by "earlier".)  You
should give the 'cursor' property an integer value, so that it
"covers" the buffer position of the newline.

Ok, thanks. I forgot that `cursor' can have an integer value.

There are only 2 situations, from your POV: either a line goes all the
way to the window edge, or it doesn't.

Could you suggest the best way to check whether the former is the case?

(>= (car (posn-col-row (posn-at-point)))
    (window-width))

> The former can happen either if there's a newline that ends a line, > or if word-wrap is in effect.

Does that constitute at least three different cases we'd need to handle?

- Not near the window edge
- near the edge and newline
- near the edge and no newline?

Yes, there could be such artifacts, but IMO losing some of the text is
worse.

I'm not sure what you mean by "losing some of the text".

And the problems you describe will be only on the lines
actually used for the popup; the rest of the lines, which just copy
buffer text into an overlay string, will look exactly like they did
before, including the continuation markers.

Err, why this distinction?

If anything, I guess we could "replace" only the first newline inside the overlay display string with wrapping, while keeping the rest as newlines, because they are irrelevant to this bug.

Start the popup overlay at the end of the preceding line, and include a
newline in its display string (because there's no newline in the
buffer).

I had no problems with that newline.

Sure. In those circumstances, moving point to the end of the overlay would be a no-op anyway.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]