]> git.lyx.org Git - features.git/commit
Find: Use greedy behaviour
authorKornel Benko <kornel@lyx.org>
Sun, 25 Nov 2018 16:51:20 +0000 (17:51 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 12:39:51 +0000 (14:39 +0200)
commit6a3d81879dff2d3131cf584c3ecbff0a20a76d36
treeaeeec3e16c5276c7df45c6fb77f9230aeaa4b0cc
parent2dab4d931ae993226b44ff844c19726f27b167c3
Find: Use greedy behaviour

This change is valid for findadv too.
Patterns like '.*' now are greedy, like it is normal in regex
Searching for whole words is corrected, but can be slow.
One can speed up the search with adapted pattern.
So for instance searching for words starting and ending with 'r'
the normal pattern is 'r.*r'. The speed-up pattern could be
'\br[^\s]*r\b'. This halves the search time.

Search results are now different to that of lyx2.3, because the greedy
'.*' is now really greedy.
To achive the same results, we have to use '.*?' instead.
src/lyxfind.cpp