all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andrey Orst <andreyorst@gmail.com>
Cc: 37848@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	[thread overview]
Message-ID: <83lfte2r1o.fsf@gnu.org> (raw)
In-Reply-To: <CAAKhXoYYd-z8PZdxTB+Z3ATMwgY3kh=Y-05zOUa2vkeVMC78fg@mail.gmail.com> (message from Andrey Orst on Mon, 21 Oct 2019 14:38:10 +0300)

[Please keep the bug address on the CC list.]

> From: Andrey Orst <andreyorst@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.





      parent reply	other threads:[~2019-10-21 12:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21  8:27 bug#37848: 27.0.50; hl-line and line-numbers out of sync Andrey Orst
2019-10-21 10:16 ` Eli Zaretskii
2019-10-21 10:24   ` Andrey Orst
2019-10-21 10:49     ` Eli Zaretskii
     [not found]       ` <CAAKhXoYYd-z8PZdxTB+Z3ATMwgY3kh=Y-05zOUa2vkeVMC78fg@mail.gmail.com>
2019-10-21 11:43         ` bug#37848: Fwd: " Andrey Orst
2019-10-21 12:58         ` Eli Zaretskii [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83lfte2r1o.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=37848@debbugs.gnu.org \
    --cc=andreyorst@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.