Author: tommaso
Date: Fri Mar 18 01:47:42 2011
New Revision: 37943
URL: http://www.lyx.org/trac/changeset/37943
Log:
Fixes a weird bug found while playing with #7363.
Indeed, unchecking ignore format in that scenario was not matching anyway while
searching.
This patch fixes that behavior.
Modified:
lyx-devel/trunk/src/lyxfind.cpp
Modified: lyx-devel/trunk/src/lyxfind.cpp
==============================================================================
--- lyx-devel/trunk/src/lyxfind.cpp Fri Mar 18 01:15:52 2011 (r37942)
+++ lyx-devel/trunk/src/lyxfind.cpp Fri Mar 18 01:47:42 2011 (r37943)
@@ -882,8 +882,9 @@
// plus the last subexpression, if a (.*?) was inserted
in the constructor.
if (!braces_match(m[0].first, m[0].second, open_braces))
return 0;
- // Check braces on segments that matched all (.*?)
subexpressions.
- for (size_t i = 1; i < m.size(); ++i)
+ // Check braces on segments that matched all (.*?)
subexpressions,
+ // except the last "padding" one inserted by lyx.
+ for (size_t i = 1; i < m.size() - 1; ++i)
if (!braces_match(m[i].first, m[i].second))
return false;
// Exclude from the returned match length any length