Skip to content

Commit

Permalink
[20_9] Replace: fix replace-one and replace-all on replace-toolbar
Browse files Browse the repository at this point in the history
## What
Fix replace-one and replace-all on the replace toolbar.

## Why
bug fix

## How to test your changes?
Click `Help->Welcome`, and click `Edit->Replace` and then replace
`<from>` with `<to>`, using the Enter key, it should work fine. Using
the mouse to click the button, it should work fine too with this pull
request.
  • Loading branch information
da-liii committed Apr 7, 2024
1 parent 325d8da commit f92efec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TeXmacs/progs/generic/search-widgets.scm
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,15 @@
(search-next-match #t)))))))

(tm-define (replace-one)
(and-with by (by-tree)
(and-with by (or (by-tree) current-replace)
(with-buffer (master-buffer)
(start-editing)
(replace-next by)
(end-editing))
(perform-search*)))

(tm-define (replace-all)
(and-with by (by-tree)
(and-with by (or (by-tree) current-replace)
(with-buffer (master-buffer)
(start-editing)
(while (replace-next by)
Expand Down

0 comments on commit f92efec

Please sign in to comment.