fix(emacs.d): Pick new buffers *into* the active window
Instead of splitting below and moving the target buffer into the new split, split and move the buffer into the active window. The other way around does (for some reason I don't fully understand) not work because `split-window-below` may return invalid windows.
This commit is contained in:
parent
ceaa0ff0ba
commit
637cb0bd2a
1 changed files with 4 additions and 4 deletions
|
@ -55,10 +55,10 @@
|
|||
:keymap ivy-switch-buffer-map
|
||||
:preselect (buffer-name (other-buffer (current-buffer)))
|
||||
:action (lambda (buffer)
|
||||
(let ((new-window (split-window-below)))
|
||||
(edwina-arrange)
|
||||
(with-selected-window new-window
|
||||
(switch-to-buffer buffer nil 'force-same-window))))
|
||||
(interactive)
|
||||
(split-window-below)
|
||||
(switch-to-buffer buffer nil 'force-same-window)
|
||||
(edwina-arrange))
|
||||
:matcher #'ivy--switch-buffer-matcher
|
||||
:caller 'ivy-switch-buffer))
|
||||
:bind (:map edwina-mode-map
|
||||
|
|
Loading…
Reference in a new issue