mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-31 10:10:48 +00:00
Disable undo and mark buffer as not modified when invoking search or
indexing.
This commit is contained in:
parent
ae2237d7ea
commit
8ab1c6a4f2
10
vlf.el
10
vlf.el
@ -451,6 +451,8 @@ BATCH-STEP is amount of overlap between successive chunks."
|
|||||||
(- vlf-file-size vlf-end-pos)
|
(- vlf-file-size vlf-end-pos)
|
||||||
vlf-start-pos)
|
vlf-start-pos)
|
||||||
vlf-file-size)))
|
vlf-file-size)))
|
||||||
|
(set-buffer-modified-p nil)
|
||||||
|
(buffer-disable-undo)
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(catch 'end-of-file
|
(catch 'end-of-file
|
||||||
(if backward
|
(if backward
|
||||||
@ -511,6 +513,7 @@ BATCH-STEP is amount of overlap between successive chunks."
|
|||||||
(progress-reporter-update reporter
|
(progress-reporter-update reporter
|
||||||
vlf-end-pos)))))
|
vlf-end-pos)))))
|
||||||
(progress-reporter-done reporter))
|
(progress-reporter-done reporter))
|
||||||
|
(set-buffer-modified-p nil)
|
||||||
(if backward
|
(if backward
|
||||||
(vlf-goto-match match-chunk-start match-chunk-end
|
(vlf-goto-match match-chunk-start match-chunk-end
|
||||||
match-end-pos match-start-pos
|
match-end-pos match-start-pos
|
||||||
@ -550,8 +553,8 @@ successful. Return nil if nothing found."
|
|||||||
(goto-char match-end)
|
(goto-char match-end)
|
||||||
(message "Moved to the %d match which is last"
|
(message "Moved to the %d match which is last"
|
||||||
(- count to-find)))
|
(- count to-find)))
|
||||||
(sit-for 0.1)
|
(unwind-protect (sit-for 5)
|
||||||
(delete-overlay overlay)
|
(delete-overlay overlay))
|
||||||
t))))
|
t))))
|
||||||
|
|
||||||
(defun vlf-re-search-forward (regexp count)
|
(defun vlf-re-search-forward (regexp count)
|
||||||
@ -677,7 +680,10 @@ Prematurely ending indexing will still show what's found so far."
|
|||||||
(pos (point)))
|
(pos (point)))
|
||||||
(vlf-beginning-of-file)
|
(vlf-beginning-of-file)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
(set-buffer-modified-p nil)
|
||||||
|
(buffer-disable-undo)
|
||||||
(unwind-protect (vlf-build-occur regexp)
|
(unwind-protect (vlf-build-occur regexp)
|
||||||
|
(set-buffer-modified-p nil)
|
||||||
(vlf-move-to-chunk start-pos end-pos)
|
(vlf-move-to-chunk start-pos end-pos)
|
||||||
(goto-char pos))))
|
(goto-char pos))))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user