diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-12-18 15:23:08 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-12-19 05:29:55 +0100 |
commit | eb973a46ba0e34026db2d2929f2aa10505623872 (patch) | |
tree | 79dbe573816d9984ee18eea5bdbaf72420f6ab1c /cui/source | |
parent | 9ed0afc79b7da20d08153c2c3e302b061292358f (diff) |
tdf#75806: use actual string leading characters for correct precondition match
Having an arbitrary prepended character prevents e.g. matching start of a word
for search continuation. Trimming the string to the start of the search breaks
correct look-behind assertion matching (e.g. for regexes like `(?<!abc)abc`).
As Michael Stahl suggested, we should use actual preceding characters instead
of the arbitraty prefix. Let's use up to 100 preceding characters in the hope
that this would be fast enough, and yet cover 99.999% of useful assertions.
When the search string does not start with a look-behind assertion, use up to
3 preceding characters (to account for UTF-16 surrogate pairs).
Change-Id: Ie19238ac792116c1d52fb2454d3142e35b6ed379
Reviewed-on: https://gerrit.libreoffice.org/85382
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cui/source')
0 files changed, 0 insertions, 0 deletions