Browse Source

Fix syntax highlighting when comments are on the same line as preprocessor directives (forum-13500)

4.1
Daniel Grunwald 14 years ago
parent
commit
2eef3e4be9
  1. 29
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/CSharp-Mode.xshd
  2. 2
      src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs

29
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/CSharp-Mode.xshd

@ -43,20 +43,21 @@ @@ -43,20 +43,21 @@
<Span color="Preprocessor">
<Begin>\#</Begin>
<RuleSet name="PreprocessorSet">
<Keywords fontWeight="bold">
<Word>if</Word>
<Word>else</Word>
<Word>elif</Word>
<Word>endif</Word>
<Word>define</Word>
<Word>undef</Word>
<Word>warning</Word>
<Word>error</Word>
<Word>line</Word>
<Word>region</Word>
<Word>endregion</Word>
<Word>pragma</Word>
</Keywords>
<Span> <!-- preprocessor directives that allow comments -->
<Begin fontWeight="bold">
(define|undef|if|elif|else|endif|line)\b
</Begin>
<RuleSet>
<Span color="Comment" ruleSet="CommentMarkerSet">
<Begin>//</Begin>
</Span>
</RuleSet>
</Span>
<Span> <!-- preprocessor directives that don't allow comments -->
<Begin fontWeight="bold">
(region|endregion|error|warning|pragma)\b
</Begin>
</Span>
</RuleSet>
</Span>

2
src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs

@ -126,6 +126,8 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -126,6 +126,8 @@ namespace ICSharpCode.SharpDevelop.Gui
}
string PROCESSOR_ARCHITEW6432 = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432");
if (!string.IsNullOrEmpty(PROCESSOR_ARCHITEW6432)) {
if (PROCESSOR_ARCHITEW6432 == "AMD64")
PROCESSOR_ARCHITEW6432 = "x86-64";
str += "Running under WOW6432, processor architecture: " + PROCESSOR_ARCHITEW6432 + Environment.NewLine;
}
} catch {}

Loading…
Cancel
Save