diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-11-08 16:40:16 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-11-08 16:40:16 +0400 |
commit | 4ccb15cbe1461542a2c31d385c1332e6875104fc (patch) | |
tree | c1a6e7ad6e1bd908bd998d1b1b160028ceee55e9 /main/src/addins/CSharpBinding | |
parent | 7a0b0adb50a61d9261158e72eb4e0a4df3f7acec (diff) | |
parent | a42774ebe04bd83d0058b51c30ab627b691118a9 (diff) |
Merge branch 'master' into newresolver
Conflicts:
main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Dom.Serialization/CodeCompletionDatabase.cs
main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog/SearchResult.cs
Diffstat (limited to 'main/src/addins/CSharpBinding')
-rw-r--r-- | main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs | 8 |
1 files changed, 4 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 ec5d5bcdcf..0f1f7471bc 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs @@ -569,7 +569,7 @@ namespace MonoDevelop.CSharp.Highlighting return; } int textOffset = i - StartOffset; - if (CurText.IsAt (textOffset, "#else")) { + if (CurText.IsAt (textOffset, "#else") && IsFirstNonWsChar (textOffset)) { if (!spanStack.Any (s => s is IfBlockSpan || s is ElseIfBlockSpan)) { base.ScanSpan (ref i); return; @@ -604,7 +604,7 @@ namespace MonoDevelop.CSharp.Highlighting FoundSpanBegin (preprocessorSpan, i, 0); return; } - if (CurText.IsAt (textOffset, "#if")) { + if (CurText.IsAt (textOffset, "#if") && IsFirstNonWsChar (textOffset)) { int length = CurText.Length - textOffset; string parameter = CurText.Substring (textOffset + 3, length - 3); AstNode expr; @@ -641,7 +641,7 @@ namespace MonoDevelop.CSharp.Highlighting i += length - 1; return; } - if (CurText.IsAt (textOffset, "#elif") && spanStack.Any (span => span is IfBlockSpan)) { + if (CurText.IsAt (textOffset, "#elif") && spanStack.Any (span => span is IfBlockSpan) && IsFirstNonWsChar (textOffset)) { LineSegment line = doc.GetLineByOffset (i); int length = line.Offset + line.EditableLength - i; string parameter = doc.GetTextAt (i + 5, length - 5); @@ -682,7 +682,7 @@ namespace MonoDevelop.CSharp.Highlighting //i += length - 1; return; } - if (CurRule.Name == "<root>" && CurText[textOffset] == '#') { + if (CurRule.Name == "<root>" && CurText[textOffset] == '#' && IsFirstNonWsChar (textOffset)) { var preprocessorSpan = CreatePreprocessorSpan (); FoundSpanBegin (preprocessorSpan, i, 1); } |