syntax-checking: prevent changing window when quitting error list
When toggling off flycheck's error list window, it calls `quit-window` which might also change the focus to another window. Wrapping this form `save-selected-window` ensures the focus always returns to where toggling command is first invoked.
This commit is contained in:
parent
99933b1fb3
commit
4636672203
1 changed files with 2 additions and 2 deletions
|
@ -34,8 +34,8 @@ true."
|
|||
"Toggle flycheck's error list window.
|
||||
If the error list is visible, hide it. Otherwise, show it."
|
||||
(interactive)
|
||||
(-if-let (window (flycheck-get-error-list-window))
|
||||
(quit-window nil window)
|
||||
(if-let ((window (flycheck-get-error-list-window)))
|
||||
(save-selected-window (quit-window nil window))
|
||||
(flycheck-list-errors)))
|
||||
|
||||
(defun spacemacs/goto-flycheck-error-list ()
|
||||
|
|
Reference in a new issue