From cbb2664667aab148868e3f20532d4823fe5e8a44 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 6 Oct 2021 16:28:57 -0500 Subject: Change pulse-line to pulse-line-current-window It doesn't currently work, but maybe will be easier to change when I'm ready... --- init.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 2347ac8..bafbc0b 100644 --- a/init.el +++ b/init.el @@ -723,16 +723,21 @@ specific to most general, they are these: pulse-delay 0.5 pulse-iterations 1) - (defun pulse-line (&rest _) - "Pulse the current line." - (pulse-momentary-highlight-one-line (point))) + ;; XXX: this doesn't work yet. I only want to pulse the line in the active + ;; window, so when I have the same buffer viewed in multiple windows I can + ;; still see where my cursor is. To see the issue, C-x 2 then C-x o a few + ;; times. + (defun pulse-line-current-window (&rest _) + "Pulse the current line, but only if this window is active." + (pulse-momentary-highlight-one-line (window-point (selected-window)))) (dolist (func '(scroll-up-command scroll-down-command - recenter-top-bottom other-window + recenter-top-bottom + other-window switch-to-buffer redraw-frame)) - (advice-add func :after #'pulse-line))) + (advice-add func :after #'pulse-line-current-window))) (setup re-builder (require 'acdw-re) -- cgit 1.4.1-21-gabe81