diff options
author | nyamatongwe <unknown> | 2013-04-09 14:24:51 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2013-04-09 14:24:51 +1000 |
commit | 1cb4197e2165f5e8690a709d4a4c73d9438d15a0 (patch) | |
tree | 2b6b11e25f53c98149e13298da32409d1a8aef58 /src/Document.cxx | |
parent | b2f8b788f10bf6197318ce2fef1a895dca17b296 (diff) | |
download | scintilla-mirror-1cb4197e2165f5e8690a709d4a4c73d9438d15a0.tar.gz |
Slightly better behaviour for regular expression search in DBCS: ensure end of
match range is not in the middle of a character.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index b75c754ac..56785af78 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -2236,6 +2236,8 @@ long BuiltinRegex::FindText(Document *doc, int minPos, int maxPos, const char *s int success = search.Execute(di, startOfLine, endOfLine); if (success) { pos = search.bopat[0]; + // Ensure only whole characters selected + search.eopat[0] = doc->MovePositionOutsideChar(search.eopat[0], 1, false); lenRet = search.eopat[0] - search.bopat[0]; // There can be only one start of a line, so no need to look for last match in line if ((increment == -1) && (s[0] != '^')) { |