]> git.earman.xyz Git - emacsinit.git/commitdiff
Change to other-window-or-split-window
authorrearman <rearman@r717.net>
Fri, 24 Mar 2023 18:46:36 +0000 (14:46 -0400)
committerrearman <rearman@r717.net>
Fri, 24 Mar 2023 18:46:36 +0000 (14:46 -0400)
This change makes it work with visual-fill-column's window splitting setup

init.org

index f45d99e0cbaac60aecafbbdadbbbe42c69ea4c25..9543a76e96795c944d09846e369de57e1167af94 100644 (file)
--- a/init.org
+++ b/init.org
@@ -873,10 +873,10 @@ I don't want line numbers in the margin unless I am actively trying to go to a l
 
 I ripped this defun and binding from [[https://github.com/lem-project/lem][lem]].  Can't live without it now.
 #+BEGIN_SRC emacs-lisp
-(defun other-window-or-split-window (&optional n)
+(defun other-window-or-split-window (&optional window)
   (interactive)
   (if (= (count-windows) 1)
-      (split-window-sensibly)
+      (funcall split-window-preferred-function window)
     (other-window 1)))
 
 (global-set-key (kbd "M-o") 'other-window-or-split-window)