]> git.lyx.org Git - lyx.git/commitdiff
* change the fold/unfold behaviour a bit: if we are just in front of a macro with...
authorStefan Schimanski <sts@lyx.org>
Fri, 2 Nov 2007 00:11:51 +0000 (00:11 +0000)
committerStefan Schimanski <sts@lyx.org>
Fri, 2 Nov 2007 00:11:51 +0000 (00:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21361 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathNest.cpp

index d26813843cf28bcb4754a524800fb64be3e7dc23..f85f6d872f2054a56447bc08605804916126cf16 100644 (file)
@@ -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