diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-11-03 10:12:50 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-11-03 10:12:50 +0400 |
commit | fb38b3d90c1f8ae2f5e728a1dbdc0e3afaf13f81 (patch) | |
tree | 101f87c468eaf81428ba8c1701b1ec8bb68815cf /main/src/addins/CSharpBinding | |
parent | b9a2ca423ee4e862062c5ca3e4a564616c8947ec (diff) |
Fixed "Bug 1828 - Regression in conditional code marking".
Diffstat (limited to 'main/src/addins/CSharpBinding')
-rw-r--r-- | main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs index 4b590720eb..4b478c0da5 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs @@ -624,13 +624,13 @@ namespace MonoDevelop.CSharp.Highlighting { while (spanStack.Count > 0 && (spanStack.Peek () is IfBlockSpan || spanStack.Peek () is ElseIfBlockSpan || spanStack.Peek () is ElseBlockSpan)) { var poppedSpan = spanStack.Pop (); - Console.WriteLine ("pop" + poppedSpan +"/" + spanStack.Count); if (ruleStack.Count > 1) // rulStack[1] is always syntax mode ruleStack.Pop (); if (poppedSpan is IfBlockSpan) break; } } + protected override bool ScanSpanEnd (Mono.TextEditor.Highlighting.Span cur, ref int i) { if (cur is IfBlockSpan || cur is ElseIfBlockSpan || cur is ElseBlockSpan) { @@ -642,11 +642,10 @@ namespace MonoDevelop.CSharp.Highlighting // if we're in a complex span stack pop it up to the if block if (spanStack.Count > 0) { var prev = spanStack.Peek (); - if ((cur is ElseIfBlockSpan || cur is ElseBlockSpan) && (spanStack.Peek () is ElseIfBlockSpan || spanStack.Peek () is ElseBlockSpan)) { + + if ((cur is ElseIfBlockSpan || cur is ElseBlockSpan) && (prev is ElseIfBlockSpan || prev is IfBlockSpan)) PopCurrentIfBlock (); - } } - } return end; } |