Skip to content

Commit

Permalink
Update search.inc
Browse files Browse the repository at this point in the history
  • Loading branch information
vygr committed Sep 17, 2023
1 parent a4c7593 commit 39c0aaf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/edit/search.inc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
rep_matchs (matches rep_text "\$([0-9]+)")
rep_text (build-replace found rep_text rep_matchs cx cy ax)))
(undoable
(.-> buffer (:set_cursor ax ay)
(.-> buffer
(:set_cursor ax ay)
(:delete (- cx ax))
(:insert rep_text)))
(refresh))
Expand All @@ -88,7 +89,8 @@
(defq y _)
(each-rev (lambda ((x x1))
(when (defq rep (build-replace found rep_text rep_matchs x y x1))
(.-> buffer (:set_cursor x y)
(.-> buffer
(:set_cursor x y)
(:delete (- x1 x))
(:insert rep)))) indexes)) found))
(bind '(cx cy) (. *edit* :get_cursor))
Expand Down

0 comments on commit 39c0aaf

Please sign in to comment.