From: Spencer Baugh <sbaugh@janestreet.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 64993@debbugs.gnu.org
Subject: bug#64993: 29.1; scroll-other-window breaks global-hl-line-sticky-flag
Date: Tue, 01 Aug 2023 13:13:36 -0400 [thread overview]
Message-ID: <iermszaadof.fsf@janestreet.com> (raw)
In-Reply-To: <83cz061z1d.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 01 Aug 2023 19:57:02 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Spencer Baugh <sbaugh@janestreet.com>
>> Cc: 64993@debbugs.gnu.org
>> Date: Tue, 01 Aug 2023 12:28:14 -0400
>>
>> 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
>
> And why is this a bug?
Because it contradicts the docstring and the intent of the flag, which
is to have a highlight for point in all windows.
> global-hl-line-sticky-flag non-nil means the
> highlight in non-selected windows is not removed:
> (defun global-hl-line-maybe-unhighlight ()
> "Maybe deactivate the Global-Hl-Line overlay on the current line.
> Specifically, when `global-hl-line-sticky-flag' is nil deactivate
> all such overlays in all buffers except the current one."
>
> So "C-x o" leaves the highlighting overlay in the window that was
> selected, and it will remain at the same position until that window
> becomes selected again, because highlighting is moved only in the
> selected window.
Yes, this is the implementation, and you have explained how it is buggy.
> If you don't like these effects of global-hl-line-sticky-flag, then
> don't use it. It's off by default, presumably due to these effects.
Things which are off by default can still be buggy.
next prev parent reply other threads:[~2023-08-01 17:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 14:59 bug#64993: 29.1; scroll-other-window breaks global-hl-line-sticky-flag Spencer Baugh
2023-08-01 15:54 ` Eli Zaretskii
2023-08-01 16:28 ` Spencer Baugh
2023-08-01 16:57 ` Eli Zaretskii
2023-08-01 17:13 ` Spencer Baugh [this message]
2023-08-01 17:20 ` Eli Zaretskii
2023-08-01 17:32 ` Spencer Baugh
2023-08-01 17:39 ` Eli Zaretskii
2023-08-01 17:46 ` Spencer Baugh
2023-08-01 18:04 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=iermszaadof.fsf@janestreet.com \
--to=sbaugh@janestreet.com \
--cc=64993@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).