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

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

bug#42039: 27.0.91; (posn-x-y (posn-at-point)) inconsistent with display


From: Dmitry Gutov
Subject: bug#42039: 27.0.91; (posn-x-y (posn-at-point)) inconsistent with display-line-numbers-mode
Date: Fri, 26 Jun 2020 15:55:31 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 26.06.2020 15:04, Eli Zaretskii wrote:
From: Dmitry Gutov <dgutov@yandex.ru>
Date: Thu, 25 Jun 2020 16:29:21 +0300

1. Enable display-line-numbers-mode.
2. Move point to the beginning of some line.
3. Evaluate (posn-x-y (posn-at-point))

=> The value in CAR will be > 0 (to account for the columns taken by
d-l-n-m).

4. Do the same thing on a line that belongs to an overlay. For example,
the overlay in the bug reporting buffer (move point to the line with
"This bug report...").
5. The return value will be like (0 . 180).

The expected behavior: the column should still account for the offset by
the d-l-n-m.

I'd really like to see this fixed in Emacs, it makes positioning of
popups unpredictable when display-line-numbers-mode is enabled:
https://github.com/company-mode/company-quickhelp/issues/106

Your wish has been granted: this should now be fixed on the emacs-27
branch.

Thank you.

It's working fine now in the cases I really care about (so we can close the report), but here's one you seem to have missed:

1. M-x report-emacs-bug.
2. Toggle display-line-numbers-mode on.
3. Move point to the second display string ("If Emacs crashed...").
4. Evaluate (posn-x-y (posn-at-point)).





reply via email to

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