mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-22 08:04:20 +01:00
Fix issue with ~dirvish-ignore-display-buffer~
When ~dirvish-ignore-display-buffer~ was called with a buffer name which does not exists (why?) it would throw an error. This broke ~lv-message~ among other things. Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
ed8afe1e86
commit
56e3bafd57
|
@ -99,11 +99,12 @@ Dirvish has an issue with ~switch-to-buffer-obey-display-actions~, so advise ~sw
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(defun dirvish-side-buffer-p (buffer-or-name)
|
(defun dirvish-side-buffer-p (buffer-or-name)
|
||||||
"Return t if BUFFER-OR-NAME is a dirvish buffer and a side buffer."
|
"Return t if BUFFER-OR-NAME is a dirvish buffer and a side buffer."
|
||||||
(with-current-buffer buffer-or-name
|
(when (get-buffer buffer-or-name)
|
||||||
(let ((dv (dirvish-curr)))
|
(with-current-buffer buffer-or-name
|
||||||
|
(let ((dv (dirvish-curr)))
|
||||||
(if (and dv (member 'side (dv-type dv)))
|
(if (and dv (member 'side (dv-type dv)))
|
||||||
t
|
t
|
||||||
nil))))
|
nil)))))
|
||||||
|
|
||||||
(defun dirvish-ignore-display-buffer (original-function buffer-or-name &rest original-arguments)
|
(defun dirvish-ignore-display-buffer (original-function buffer-or-name &rest original-arguments)
|
||||||
(let ((switch-to-buffer-obey-display-actions (not (dirvish-side-buffer-p buffer-or-name))))
|
(let ((switch-to-buffer-obey-display-actions (not (dirvish-side-buffer-p buffer-or-name))))
|
||||||
|
|
Loading…
Reference in a new issue