aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2013-04-09 14:24:51 +1000
committernyamatongwe <devnull@localhost>2013-04-09 14:24:51 +1000
commit9e2240700ad781f374a857fd05da3908307aa0cb (patch)
treeec6e1385d1d6a67e0c1782ebad7861567678703b /src
parent4e2ff17f9c02fbb62654e2346a94140953e4975c (diff)
downloadscintilla-mirror-9e2240700ad781f374a857fd05da3908307aa0cb.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')
-rw-r--r--src/Document.cxx2
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] != '^')) {