mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-31 10:10:48 +00:00
Merge branch 'master' into edit
This commit is contained in:
commit
0ff2f3eb9b
13
vlfi.el
13
vlfi.el
@ -334,21 +334,24 @@ OP-TYPE specifies the file operation being performed over FILENAME."
|
|||||||
"Move to chunk surrounding MATCH-POS-START and MATCH-POS-END.
|
"Move to chunk surrounding MATCH-POS-START and MATCH-POS-END.
|
||||||
According to COUNT and left TO-FIND, show if search has been
|
According to COUNT and left TO-FIND, show if search has been
|
||||||
successful. Return nil if nothing found."
|
successful. Return nil if nothing found."
|
||||||
(vlfi-move-to-batch (- match-pos-start (/ vlfi-batch-size 2)))
|
(let ((success (zerop to-find)))
|
||||||
|
(or success
|
||||||
|
(vlfi-move-to-batch (- match-pos-start
|
||||||
|
(/ vlfi-batch-size 2))))
|
||||||
(let* ((match-end (- match-pos-end vlfi-start-pos))
|
(let* ((match-end (- match-pos-end vlfi-start-pos))
|
||||||
(overlay (make-overlay (- match-pos-start vlfi-start-pos)
|
(overlay (make-overlay (- match-pos-start vlfi-start-pos)
|
||||||
match-end)))
|
match-end)))
|
||||||
(overlay-put overlay 'face 'region)
|
(overlay-put overlay 'face 'region)
|
||||||
(goto-char match-end)
|
(or success (goto-char match-end))
|
||||||
(prog1 (cond ((zerop to-find) t)
|
(prog1 (cond (success t)
|
||||||
((< to-find count)
|
((< to-find count)
|
||||||
(message "Moved to the %d match which is last found"
|
(message "Moved to the %d match which is last"
|
||||||
(- count to-find))
|
(- count to-find))
|
||||||
t)
|
t)
|
||||||
(t (message "Not found")
|
(t (message "Not found")
|
||||||
nil))
|
nil))
|
||||||
(sit-for 0.1)
|
(sit-for 0.1)
|
||||||
(delete-overlay overlay))))
|
(delete-overlay overlay)))))
|
||||||
|
|
||||||
(defun vlfi-re-search-forward (regexp count)
|
(defun vlfi-re-search-forward (regexp count)
|
||||||
"Search forward for REGEXP prefix COUNT number of times."
|
"Search forward for REGEXP prefix COUNT number of times."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user