mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-31 02:00:47 +00:00
Keep undo list after occur or unsuccessful line search.
This commit is contained in:
parent
a71ee32508
commit
ffac6972ed
@ -136,9 +136,9 @@ Prematurely ending indexing will still show what's found so far."
|
|||||||
(let ((start-pos vlf-start-pos)
|
(let ((start-pos vlf-start-pos)
|
||||||
(end-pos vlf-end-pos)
|
(end-pos vlf-end-pos)
|
||||||
(pos (point)))
|
(pos (point)))
|
||||||
(vlf-beginning-of-file)
|
|
||||||
(goto-char (point-min))
|
|
||||||
(vlf-with-undo-disabled
|
(vlf-with-undo-disabled
|
||||||
|
(vlf-beginning-of-file)
|
||||||
|
(goto-char (point-min))
|
||||||
(unwind-protect (vlf-build-occur regexp (current-buffer))
|
(unwind-protect (vlf-build-occur regexp (current-buffer))
|
||||||
(vlf-move-to-chunk start-pos end-pos)
|
(vlf-move-to-chunk start-pos end-pos)
|
||||||
(goto-char pos))))))
|
(goto-char pos))))))
|
||||||
|
@ -241,7 +241,8 @@ Search is performed chunk by chunk in `vlf-batch-size' memory."
|
|||||||
(setq success (vlf-re-search "[\n\C-m]" n t 0))))))
|
(setq success (vlf-re-search "[\n\C-m]" n t 0))))))
|
||||||
(if font-lock (font-lock-mode 1))
|
(if font-lock (font-lock-mode 1))
|
||||||
(unless success
|
(unless success
|
||||||
(vlf-move-to-chunk-2 start-pos end-pos)
|
(vlf-with-undo-disabled
|
||||||
|
(vlf-move-to-chunk-2 start-pos end-pos))
|
||||||
(goto-char pos)
|
(goto-char pos)
|
||||||
(message "Unable to find line")))))
|
(message "Unable to find line")))))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user