completion/ivy: refactor ag other-window action; replace def-counsel-action macro
This commit is contained in:
parent
bed66a5e12
commit
f05819c85f
3 changed files with 32 additions and 42 deletions
|
@ -143,3 +143,14 @@ interferes with my custom :[ar]g ex command `+ivy:file-search'."
|
|||
;;;###autoload
|
||||
(defun +ivy-yas-prompt (prompt choices &optional display-fn)
|
||||
(yas-completing-prompt prompt choices display-fn #'ivy-completing-read))
|
||||
|
||||
;;;###autoload
|
||||
(defun +ivy-git-grep-other-window-action (x)
|
||||
"Opens the current candidate in another window."
|
||||
(let (dest-window)
|
||||
(cl-letf (((symbol-function 'find-file)
|
||||
(lambda (filename)
|
||||
(find-file-other-window filename)
|
||||
(setq dest-window (selected-window)))))
|
||||
(counsel-git-grep-action x)
|
||||
(select-window dest-window))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue