new find-dialog in 2.4.0-alpha3 may lead to unintentional deletion of text

Pavel Sanda sanda at lyx.org
Thu Apr 8 12:19:28 UTC 2021


On Thu, Apr 08, 2021 at 12:16:55PM +0200, Jürgen Spitzmüller wrote:
> Am Donnerstag, dem 08.04.2021 um 12:05 +0200 schrieb Micha H. Werner:
> > using the new find-dialog in 2.4.0-alpha3 may lead to the unintended
> > deletion of the terms searched for: 
> > 
> > strg-f -- enter search term -- hit enter often enough --> at some
> > point, the focus shifts from the search menu to the document itself
> > and
> > the highlighted text is replaced by a new paragraph.
> > 
> > it would be less dangerous if the focus would stay within the search
> > menu as was the case in earlier versions of lyx.
> 
> This is caused by the "Start from beginning" dialog and there seems to
> be no way to avoid the focus change (or force re-focusing); at least I
> have not found any. However, if you check "Wrap" the dialog does not
> appear and the focus stays within the dialog.

Alternatively - if you can compile lyx on your own - you could privately
use the following patch to get rid of the dialog altogether as I did.

Pavel
-------------- next part --------------
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 09bfeadcb1..79905fc750 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -338,7 +338,7 @@ bool findOne(BufferView * bv, docstring const & searchstr,
 	}
 	else if (check_wrap) {
 		DocIterator cur_orig(bv->cursor());
-		if (!auto_wrap) {
+		if (!auto_wrap&0) {
 			docstring q;
 			if (forward)
 				q = _("End of file reached while searching forward.\n"


More information about the lyx-devel mailing list