mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-18 12:05:31 +00:00
Add vlfi-occur-show command for showing match but still staying in
occur buffer.
This commit is contained in:
parent
54927afb8f
commit
70719b0917
14
vlfi.el
14
vlfi.el
@ -528,6 +528,7 @@ Search is performed chunk by chunk in `vlfi-batch-size' memory."
|
||||
(define-key map "p" 'vlfi-occur-prev-match)
|
||||
(define-key map "\C-m" 'vlfi-occur-visit)
|
||||
(define-key map [mouse-1] 'vlfi-occur-visit)
|
||||
(define-key map "o" 'vlfi-occur-show)
|
||||
map)
|
||||
"Keymap for command `vlfi-occur-mode'.")
|
||||
|
||||
@ -552,6 +553,19 @@ Search is performed chunk by chunk in `vlfi-batch-size' memory."
|
||||
(goto-char (or (previous-single-property-change (point) 'face)
|
||||
(point-max)))))
|
||||
|
||||
(defun vlfi-occur-show (&optional event)
|
||||
"Visit current `vlfi-occur' link in a vlfi buffer but stay in the \
|
||||
occur buffer. If original VLFI buffer has been killed,
|
||||
open new VLFI session each time.
|
||||
EVENT may hold details of the invocation."
|
||||
(interactive (list last-nonmenu-event))
|
||||
(let ((occur-buffer (if event
|
||||
(window-buffer (posn-window
|
||||
(event-end event)))
|
||||
(current-buffer))))
|
||||
(vlfi-occur-visit event)
|
||||
(pop-to-buffer occur-buffer)))
|
||||
|
||||
(defun vlfi-occur-visit (&optional event)
|
||||
"Visit current `vlfi-occur' link in a vlfi buffer.
|
||||
The same for mouse EVENT."
|
||||
|
Loading…
x
Reference in New Issue
Block a user