From f92efecb102e992d1ab9e59a39c9b71f0ce65095 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Sun, 7 Apr 2024 22:23:43 +0800 Subject: [PATCH] [20_9] Replace: fix replace-one and replace-all on replace-toolbar ## 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 `` with ``, using the Enter key, it should work fine. Using the mouse to click the button, it should work fine too with this pull request. --- TeXmacs/progs/generic/search-widgets.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TeXmacs/progs/generic/search-widgets.scm b/TeXmacs/progs/generic/search-widgets.scm index 18b6f62860..e93af73ab0 100644 --- a/TeXmacs/progs/generic/search-widgets.scm +++ b/TeXmacs/progs/generic/search-widgets.scm @@ -363,7 +363,7 @@ (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) @@ -371,7 +371,7 @@ (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)