Skip to content

Commit

Permalink
Editor: fix script editor fold in comment in scintilla lexxer
Browse files Browse the repository at this point in the history
The issue here is if foldExplicitStart is empty it is defined as `"//{"`  and foldExplicitEnd it is defined as `"//}"`.

This causes the confusing behavior that if foldCommentExplicit  is true, the scintilla cpp lexxer can fold in comments following the previously defined start and terminator string. We are setting it to false to disable this unexpected behavior.
  • Loading branch information
ericoporto authored and ivan-mogilko committed Apr 7, 2024
1 parent 72223b9 commit a128276
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Editor/AGS.Editor/Panes/ScintillaWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ public ScintillaWrapper()
// to make this work properly we need to supply keywords for preprocessor,
// otherwise lexer will not know about external defines.
scintillaControl1.SetProperty("lexer.cpp.track.preprocessor", "0");
// avoid confusing comment fold feature, see https://github.com/adventuregamestudio/ags/issues/2323
scintillaControl1.SetProperty("fold.cpp.comment.explicit", "0");

Factory.GUIController.ColorThemes.Apply(LoadColorTheme);
UpdateAllStyles();
Expand Down

0 comments on commit a128276

Please sign in to comment.