about summary refs log tree commit diff
path: root/tools/emacs/config/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'tools/emacs/config/init.el')
-rw-r--r--tools/emacs/config/init.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/emacs/config/init.el b/tools/emacs/config/init.el
index 307699536cc4..4129de4d37a5 100644
--- a/tools/emacs/config/init.el
+++ b/tools/emacs/config/init.el
@@ -61,11 +61,15 @@
                         (edwina-arrange))
               :matcher #'ivy--switch-buffer-matcher
               :caller 'ivy-switch-buffer))
-  :bind (:map edwina-mode-map
-              ("s-w b" . #'edwina-split-to-buffer))
-  :config
-  (advice-add 'split-window-below :after 'edwina-arrange)
-  (edwina-mode 1))
+  ;; Using an advice for this functionality breaks various internal
+  ;; things in split-window, hence a new interactive function.
+  (defun edwina-split-arrange ()
+    (interactive)
+    (split-window-below)
+    (edwina-arrange))
+  :bind (("C-x 2" . edwina-split-arrange)
+         :map edwina-mode-map
+         ("s-w b" . #'edwina-split-to-buffer)))
 
 (use-package gruber-darker-theme)
 (use-package ht)