Subject: bug#57876: [PATCH] pulse-momentary-highlight-one-line: Act on visual line

From: Augusto Stoffel <[email-masked]>
Date: Sat, 17 Sep 2022 10:23:01 +0200

Tags: patch

Currently, if point is say at the prompt of a comint buffer,
pulse-momentary-highlight-one-line doesn't show do anything – or, more
precisely, it pulses the zero-length region from prompt end to EOB.

Prot: I think you want to apply a similar change in pulsar.el.

>From e1241510fc9e0deddc5adb416aec5de4ca0300c8 Mon Sep 17 00:00:00 2001
From: Augusto Stoffel <[email-masked]>
Date: Sat, 17 Sep 2022 10:17:34 +0200
Subject: [PATCH] pulse-momentary-highlight-one-line: Act on visual line

* lisp/cedet/pulse.el (pulse-momentary-highlight-one-line):  Act on
entire visual line, ignoring fields etc.
---
 lisp/cedet/pulse.el | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
index 9941f2a0cb..0564cf6d04 100644
--- a/lisp/cedet/pulse.el
+++ b/lisp/cedet/pulse.el
@@ -202,12 +202,8 @@ pulse-momentary-highlight-one-line
 Optional argument FACE specifies the face to do the highlighting."
   (save-excursion
     (goto-char (or point (point)))
-    (let ((start (line-beginning-position))
-          (end (save-excursion
-                 (end-of-line)
-                 (when (not (eobp))
-                   (forward-char 1))
-                 (point))))
+    (let ((start (progn (vertical-motion 0) (point)))
+          (end (progn (vertical-motion 1) (point))))
       (pulse-momentary-highlight-region start end face))))
 
 ;;;###autoload
-- 
2.37.3