diff options
-rw-r--r-- | init.el | 15 |
1 files changed, 10 insertions, 5 deletions
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: | |||
723 | pulse-delay 0.5 | 723 | pulse-delay 0.5 |
724 | pulse-iterations 1) | 724 | pulse-iterations 1) |
725 | 725 | ||
726 | (defun pulse-line (&rest _) | 726 | ;; XXX: this doesn't work yet. I only want to pulse the line in the active |
727 | "Pulse the current line." | 727 | ;; window, so when I have the same buffer viewed in multiple windows I can |
728 | (pulse-momentary-highlight-one-line (point))) | 728 | ;; still see where my cursor is. To see the issue, C-x 2 then C-x o a few |
729 | ;; times. | ||
730 | (defun pulse-line-current-window (&rest _) | ||
731 | "Pulse the current line, but only if this window is active." | ||
732 | (pulse-momentary-highlight-one-line (window-point (selected-window)))) | ||
729 | 733 | ||
730 | (dolist (func '(scroll-up-command | 734 | (dolist (func '(scroll-up-command |
731 | scroll-down-command | 735 | scroll-down-command |
732 | recenter-top-bottom other-window | 736 | recenter-top-bottom |
737 | other-window | ||
733 | switch-to-buffer | 738 | switch-to-buffer |
734 | redraw-frame)) | 739 | redraw-frame)) |
735 | (advice-add func :after #'pulse-line))) | 740 | (advice-add func :after #'pulse-line-current-window))) |
736 | 741 | ||
737 | (setup re-builder | 742 | (setup re-builder |
738 | (require 'acdw-re) | 743 | (require 'acdw-re) |