GNU bug report logs - #64993
29.1; scroll-other-window breaks global-hl-line-sticky-flag

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Tue, 1 Aug 2023 15:00:02 UTC

Severity: wishlist

Found in version 29.1

Full log


Message #13 received at 64993 <at> debbugs.gnu.org (full text, mbox):

From: Spencer Baugh <sbaugh <at> janestreet.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 64993 <at> debbugs.gnu.org
Subject: Re: bug#64993: 29.1; scroll-other-window breaks
 global-hl-line-sticky-flag
Date: Tue, 01 Aug 2023 12:28:14 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:
> tags 64993 notabug
> thanks
>
>> From: Spencer Baugh <sbaugh <at> janestreet.com>
>> Date: Tue, 01 Aug 2023 10:59:29 -0400
>> 
>> 
>> 1. emacs -Q
>> 2. Eval
>> (setq global-hl-line-sticky-flag t)
>> (global-hl-line-mode)
>> 3. C-h n  (to open up a buffer with lots of text for scrolling)
>> 4. C-x 3
>> 5. Note the line with point is highlighted in both windows
>> 6. scroll-other-window
>> 7. Note the line with point is no longer highlighted in the other window
>
> That's a feature, and you activated it by setting
> global-hl-line-sticky-flag:
>
>   (defcustom global-hl-line-sticky-flag nil
>     "Non-nil means the Global HL-Line mode highlight appears in all windows.
>
>   (define-minor-mode global-hl-line-mode
>     "Toggle line highlighting in all buffers (Global Hl-Line mode).
>
>   If `global-hl-line-sticky-flag' is non-nil, Global Hl-Line mode
>   highlights the line about the current buffer's point in all live
>   windows.
>
> So what you describe as "the line with point is no longer highlighted
> in the other window" actually happens before the point in the selected
> window is no longer visible in the other window, and thus neither is
> the highlighted line.
>
> This is not a bug.

Oops, sorry, my reproduction was confusing, I made an error in having
both windows contain the same buffer.  They should obviously contain
different buffers otherwise your response is correct.

Try again with:

1. emacs -Q
2. Eval
(setq global-hl-line-sticky-flag t)
(global-hl-line-mode)
3. C-x 3  (make two windows)
4. C-h n  (make one window contain NEWS)
5. C-x o  (switch to the other window)
6. Note the line with point is highlighted in both windows
6. scroll-other-window
7. Note the line with point is no longer highlighted in the NEWS window





This bug report was last modified 1 year and 158 days ago.

Previous Next


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