unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com>
To: 45946@debbugs.gnu.org
Subject: bug#45946: [PATCH] Re: bug#45946: 28.0.50; hl-line-sticky-flag not working
Date: Wed, 20 Jan 2021 22:07:33 -0300	[thread overview]
Message-ID: <CH2PR01MB58793D2A9A2B87E02C7875988BA10@CH2PR01MB5879.prod.exchangelabs.com> (raw)
In-Reply-To: <CH2PR01MB58794E596605B63A332D61038BA40@CH2PR01MB5879.prod.exchangelabs.com> (Gabriel do Nascimento Ribeiro's message of "Mon, 18 Jan 2021 01:13:38 -0300")

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

Here is a proposal of patch for this bug. It seems to work well in all
cases I have tested, but maybe I am missing some edge case. Suggestions
are welcome.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Always-set-overlay-current-buffer-on-hl-line-maybe-u.patch --]
[-- Type: text/x-diff, Size: 855 bytes --]

From f4586cd7f535a9613216f61888a5ab8ee05352ca Mon Sep 17 00:00:00 2001
From: Gabriel do Nascimento Ribeiro <gabriel.nascimento@nubank.com.br>
Date: Wed, 20 Jan 2021 22:02:31 -0300
Subject: [PATCH] Always set overlay current-buffer on
 hl-line-maybe-unhighlight

---
 lisp/hl-line.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/hl-line.el b/lisp/hl-line.el
index 73870f9579..b19b9543f5 100644
--- a/lisp/hl-line.el
+++ b/lisp/hl-line.el
@@ -193,8 +193,7 @@ hl-line-maybe-unhighlight
       (with-current-buffer hlob
         (when (overlayp hl-line-overlay)
           (delete-overlay hl-line-overlay))))
-    (when (and (overlayp hl-line-overlay)
-               (eq (overlay-buffer hl-line-overlay) curbuf))
+    (when (overlayp hl-line-overlay)
       (setq hl-line-overlay-buffer curbuf))))
 
 ;;;###autoload
-- 
2.27.0


  reply	other threads:[~2021-01-21  1:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  4:13 bug#45946: 28.0.50; hl-line-sticky-flag not working Gabriel do Nascimento Ribeiro
2021-01-21  1:07 ` Gabriel do Nascimento Ribeiro [this message]
2021-01-21 14:13   ` bug#45946: [PATCH] " Eli Zaretskii
2021-01-23  2:22     ` Gabriel do Nascimento Ribeiro
2021-01-23  8:10       ` Eli Zaretskii
2021-01-23 19:11         ` Gabriel do Nascimento Ribeiro
2021-01-23 19:37           ` 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=CH2PR01MB58793D2A9A2B87E02C7875988BA10@CH2PR01MB5879.prod.exchangelabs.com \
    --to=gabriel376@hotmail.com \
    --cc=45946@debbugs.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).