]> 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)
committerKornel Benko <kornel@lyx.org>
Sun, 25 Nov 2018 16:51:20 +0000 (17:51 +0100)
commite96a9d63294b68fd8b39afa82b0f4fac11dded52
treeaeeec3e16c5276c7df45c6fb77f9230aeaa4b0cc
parente2a3dd1167b6e3350245500fa7cadcc356e59b8e
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