Allow last-search-buffer to resume last search even if no saved search
With this patch, it's possible to resume last search done with ag even if there's no saved search Fixes #3707
This commit is contained in:
parent
951462f316
commit
17f6225c5d
|
@ -614,11 +614,14 @@ Removes the automatic guessing of the initial value based on thing at point. "
|
|||
(defun spacemacs/last-search-buffer ()
|
||||
"open last helm-ag or hgrep buffer."
|
||||
(interactive)
|
||||
(if (get-buffer "*helm ag results*")
|
||||
(switch-to-buffer-other-window "*helm ag results*")
|
||||
(if (get-buffer "*hgrep*")
|
||||
(switch-to-buffer-other-window "*hgrep*")
|
||||
(message "No previous search buffer found"))))
|
||||
(cond ((get-buffer "*helm ag results*")
|
||||
(switch-to-buffer-other-window "*helm ag results*"))
|
||||
((get-buffer "*helm-ag*")
|
||||
(helm-resume "*helm-ag*"))
|
||||
((get-buffer "*hgrep*")
|
||||
(switch-to-buffer-other-window "*hgrep*"))
|
||||
(t
|
||||
(message "No previous search buffer found"))))
|
||||
|
||||
(defun spacemacs/helm-faces ()
|
||||
"Describe face."
|
||||
|
|
Loading…
Reference in a new issue