branch: externals/hydra
commit 9db28034d7d61bfeff89899633b958f22befc53d
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    lv.el (lv-window-hook): Add
    
    Re emacs-lsp/lsp-mode#1216
    
    Example:
    
        (add-hook 'lv-window-hook 'visual-line-mode)
---
 lv.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lv.el b/lv.el
index 5cc06961b7..2fd1838e06 100644
--- a/lv.el
+++ b/lv.el
@@ -63,6 +63,9 @@ Only the background color is significant."
 (defvar display-fill-column-indicator)
 (defvar tab-line-format)
 
+(defvar lv-window-hook nil
+  "Hook to run by `lv-window' when a new window is created.")
+
 (defun lv-window ()
   "Ensure that LV window is live and return it."
   (if (window-live-p lv-wnd)
@@ -86,7 +89,8 @@ Only the background color is significant."
           (setq display-line-numbers nil)
           (setq display-fill-column-indicator nil)
           (set-window-dedicated-p lv-wnd t)
-          (set-window-parameter lv-wnd 'no-other-window t))
+          (set-window-parameter lv-wnd 'no-other-window t)
+          (run-hooks 'lv-window-hook))
         (select-window ori)))))
 
 (defvar golden-ratio-mode)

Reply via email to