]> git.eshelyaron.com Git - dotfiles.git/commitdiff
Pulse line after switching windows
authorEshel Yaron <me@eshelyaron.com>
Fri, 14 Apr 2023 08:34:35 +0000 (11:34 +0300)
committerEshel Yaron <me@eshelyaron.com>
Fri, 14 Apr 2023 08:34:35 +0000 (11:34 +0300)
.emacs.d/init.el

index cb118b429946bc817d5a226a559882e14fa1cb9a..1ef75d9ad543e0bc799901306586ee78cd1d9975 100644 (file)
        (basic-save-buffer))
      (executable-make-buffer-file-executable-if-script-p))))
 
+(esy/init-step pulse-on-window-selection-change
+  "Pulse the line around point after switching windows."
+
+  (defun esy/pulse-on-window-selection-change (&rest _)
+    (pulse-momentary-highlight-one-line))
+
+  (add-hook 'window-selection-change-functions
+            #'esy/pulse-on-window-selection-change))
+
 (esy/init-step startup-message
   "Override the default startup message."
   (define-advice startup-echo-area-message (:override () report-init-time)