Re: #13140: Restrict advanced find/replace to selection

Scott Kostyshak <[email protected]>
Newsgroups gmane.editors.lyx.devel
Message-ID <acf2K8mtM8UxvvoM@jimmy>
On Sat, Mar 28, 2026 at 12:57:47PM +0100, Jürgen Spitzmüller wrote:
> Am Montag, dem 23.03.2026 um 16:34 +0100 schrieb Jürgen Spitzmüller:
> > Kornel Benko schrieb am 23.03.2026 08:03 (GMT +01:00):
> > > I don't see it working there either.
> > > Consider a selected region with 2 instances of the search string.
> > > Searching for the first --> OK
> > > Searching for the next -->Fail
> > 
> > I think this is how it is currently designed: It limits search to the
> > scope of selection, but once a hit has been found, the selection is
> > gone, so you only can find the first hit in a selection (or the last
> > if searching backwards).
> 
> I implemented a different design at 643e2bb0f9207f5.
> Now all hits within a selection can be found/replaced.
> 
> Please test.

Thanks for working on it!

I might have found a small problem, but not sure.

1. Open Help > Introduction
2. Select the first paragraph (starting with "LyX is a document preparation system.").
3. Press ctrl + f for find.
4. Check "Selection only".
5. In "Find what", put "is".
6. Keep pressing Return.

after correct instances are found, I then get the following:

  "The search string was not found within the selection. Continue search outside?"

I think the wording is a bit confusing, because the string was indeed
found multiple types within the selection. It just wasn't found *again*.
But not a big deal.

I then press return again (to select "yes" in the dialog). LyX then
correctly finds the next instance outside. But then if I press return
one more time, nothing else is found.

I realized that clicking on "Find" instead of pressing return does not
exhibit the same behavior (i.e., using the mouse it works as expected).
This helped me to realize that I think the "problem" is that <Return> is
not connected to "Find" after that dialog pops up.

Not sure if this is an issue, and even if it is it's not a deal breaker.

Scott

-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEMfkICpsJzYuNuGlOA4ZnarZHC+sFAmnH+P0ACgkQA4ZnarZH
C+tV5wf/fxqIdsLv6jdwpJlFJqDsR/Q/AkgdIyCvMoEV4tPmE0TmZZ9P74NZQDPp
8Cc5okWelJGuHk28e3Ce4lKPY6Kl6A+5sNEnRy4xsp2g3rV35giK89okMRvUUGYR
ukp+Lhkr0CqN+xJmzMeqe+rYJ4CP1+fnam7XApBceH+IWd6lmPm+apMA8ZIOCmlb
AXeFWfjchBjuQ3J50eX+m7waOZUj1IC86EV1mhisv7ptkAXXtrAD94pl5vnScqMD
G5d7LoWEIQBYcmL/eZHO510hZcRXp90a56atItZPC3r+HRglnCYwY+wyFvz17lMl
G56lkT2IeUeevQdwTUioaYw5l8be9Q==
=Caps
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.