From b82ab307b7ee8bcc547aa076c17355ad7bb7ea24 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 4 Jun 2017 17:17:37 -0400 Subject: Fixed start-anchored "find prev" TRE regex searches; src/scintilla.patch --- src/scintilla.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/scintilla.patch b/src/scintilla.patch index ac950c56..6a836ac6 100644 --- a/src/scintilla.patch +++ b/src/scintilla.patch @@ -111,7 +111,7 @@ diff -r bfdfb44eb777 src/Document.cxx + int repetitions = 1000; // break out of infinite loop + while (success && pmatch[0].rm_eo <= endPos && repetitions--) { + success = tre_regnexec(&preg, string + pos + 1, len - (pos + 1), 10, -+ pmatch, eflags) == REG_OK; ++ pmatch, eflags | REG_NOTBOL) == REG_OK; + if (success) { + for (int i = 0; i < 10 && pmatch[i].rm_so != -1; i++) + pmatch[i].rm_so += pos + 1, pmatch[i].rm_eo += pos + 1; // adjust -- cgit v1.2.3