From: Stefan Schimanski Date: Fri, 2 Nov 2007 00:11:51 +0000 (+0000) Subject: * change the fold/unfold behaviour a bit: if we are just in front of a macro with... X-Git-Tag: 1.6.10~7538 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=cc1b8dbe2bb949afbe4aff0ec434cbb1ef57c010;p=features.git * 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 --- 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