From cc1b8dbe2bb949afbe4aff0ec434cbb1ef57c010 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Fri, 2 Nov 2007 00:11:51 +0000 Subject: [PATCH] * change the fold/unfold behaviour a bit: if we are just in front of a macro with wrong state after we went one level up, we look further left. This feels more natural in cases nullary macros appear as parameters of other macros. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21361 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathNest.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index d26813843c..f85f6d872f 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -1068,8 +1068,11 @@ bool InsetMathNest::findMacroToFoldUnfold(Cursor & it, bool fold) const { if (macro->folded() != fold) return true; - // wrong folding state -> go up one level - break; + // Wrong folding state. + // If this was the first we see in this slice, look further left, + // otherwise go up. + if (inset != it.nextInset()) + break; } // go up if this was the left most position -- 2.39.2