Spacemacs buffer in other window with prefix arg

This commit is contained in:
duianto 2020-01-08 08:55:12 +01:00 committed by Maximilian Wolff
parent 4b451a5fe3
commit ad521fff5c
No known key found for this signature in database
GPG key ID: 2DD07025BFDBD89A
2 changed files with 8 additions and 2 deletions

View file

@ -536,6 +536,8 @@ Other:
(thanks to Spenser Truex)
- Converted =case= to =cl-case= to fix =cl-lib= related errors
(thanks to Nikita Leshenko)
- Open Spacemacs home buffer in other/new window with prefix argument
(thanks to duianto)
- Fixes:
- Avoid non-idempotent use of push in init code (thanks to Miciah Masters)
- Moved Spacemacs startup progress bar to =core-progress-bar.el=, removed

View file

@ -1008,7 +1008,9 @@ SEQ, START and END are the same arguments as for `cl-subseq'"
(defun spacemacs-buffer/goto-buffer (&optional refresh)
"Create the special buffer for `spacemacs-buffer-mode' and switch to it.
REFRESH if the buffer should be redrawn."
REFRESH if the buffer should be redrawn.
If a prefix argument is given, switch to it in an other, possibly new window."
(interactive)
(let ((buffer-exists (buffer-live-p (get-buffer spacemacs-buffer-name)))
(save-line nil))
@ -1045,7 +1047,9 @@ REFRESH if the buffer should be redrawn."
(forward-line (1- save-line))
(forward-to-indentation 0))
(spacemacs-buffer/goto-link-line)))
(switch-to-buffer spacemacs-buffer-name)
(if current-prefix-arg
(switch-to-buffer-other-window spacemacs-buffer-name)
(switch-to-buffer spacemacs-buffer-name))
(spacemacs//redisplay))))
(add-hook 'window-setup-hook