GNU bug report logs - #37848
27.0.50; hl-line and line-numbers out of sync

Previous Next

Package: emacs;

Reported by: Andrey Orst <andreyorst <at> gmail.com>

Date: Mon, 21 Oct 2019 08:29:02 UTC

Severity: normal

Found in version 27.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrey Orst <andreyorst <at> gmail.com>
Cc: 37848 <at> debbugs.gnu.org
Subject: bug#37848: 27.0.50; hl-line and line-numbers out of sync
Date: Mon, 21 Oct 2019 15:58:59 +0300
[Please keep the bug address on the CC list.]

> From: Andrey Orst <andreyorst <at> gmail.com>
> Date: Mon, 21 Oct 2019 14:38:10 +0300
> 
> > It's a bug in hl-line that needs to be fixed.
> >
> > The display engine runs pre-redisplay-function for the window in this
> > case, so perhaps hl-line could install its hook there and fix its
> > overlay when it is called.
> >
> > Patches are welcome.
> 
> Unfortunately adding these hooks doesn't fix issue:
> 
> (add-hook 'pre-redisplay-function #'hl-line-highlight nil t)
> (add-hook 'pre-redisplay-function #'hl-line-maybe-unhighlight nil t)
> (add-hook 'pre-redisplay-function #'global-hl-line-highlight)
> (add-hook 'pre-redisplay-function #'global-hl-line-maybe-unhighlight)

This is not as simple as this;  pre-redisplay-function is called with
an argument, a list of windows that are to be redisplayed (in this
case I expect to see only one window in the list).  The function
should move the overlay in that window using that window's point
position.  By contrast, the functions you tried don't accept any
arguments, and hl-line-highlight assumes that it is called in the
selected window.

Thanks.




This bug report was last modified 5 years and 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.