1
0
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:
Andrey Kotlarski 2014-01-27 02:15:56 +02:00
parent a71ee32508
commit ffac6972ed
2 changed files with 4 additions and 3 deletions

View File

@ -136,9 +136,9 @@ Prematurely ending indexing will still show what's found so far."
(let ((start-pos vlf-start-pos)
(end-pos vlf-end-pos)
(pos (point)))
(vlf-with-undo-disabled
(vlf-beginning-of-file)
(goto-char (point-min))
(vlf-with-undo-disabled
(unwind-protect (vlf-build-occur regexp (current-buffer))
(vlf-move-to-chunk start-pos end-pos)
(goto-char pos))))))

View File

@ -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))))))
(if font-lock (font-lock-mode 1))
(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)
(message "Unable to find line")))))