mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 13:51:40 +00:00
Code folding in the script editor works again. Fixes #115.
This commit is contained in:
parent
e187872553
commit
37c52b4d70
2 changed files with 3 additions and 3 deletions
|
@ -381,7 +381,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
|
||||
// Text must be exactly the same
|
||||
long hash = MurmurHash2.Hash(Text);
|
||||
bool applyfolding = General.Settings.ScriptShowFolding && (editor.Scintilla.Lexer == Lexer.Cpp /*|| editor.Scintilla.Lexer == Lexer.CppNoCase*/);
|
||||
bool applyfolding = General.Settings.ScriptShowFolding && (editor.Scintilla.Lexer == Lexer.Cpp || (int)editor.Scintilla.Lexer == 35); // 35 - custom CPP case insensitive style lexer
|
||||
if(hash == settings.Hash)
|
||||
{
|
||||
// Restore fold levels
|
||||
|
@ -402,7 +402,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
|
||||
internal void SetDefaultViewSettings()
|
||||
{
|
||||
if(General.Settings.ScriptShowFolding && (editor.Scintilla.Lexer == Lexer.Cpp /*|| editor.Scintilla.Lexer == Lexer.CppNoCase*/))
|
||||
if(General.Settings.ScriptShowFolding && (editor.Scintilla.Lexer == Lexer.Cpp || (int)editor.Scintilla.Lexer == 35)) // 35 - custom CPP case insensitive style lexer
|
||||
ApplyFolding(GetFoldLevels());
|
||||
}
|
||||
|
||||
|
|
|
@ -479,7 +479,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
handler.SetKeywords(lexercfg, lexername);
|
||||
|
||||
// Setup folding (https://github.com/jacobslusser/ScintillaNET/wiki/Automatic-Code-Folding)
|
||||
if(General.Settings.ScriptShowFolding && (scriptconfig.Lexer == Lexer.Cpp /*|| scriptconfig.Lexer == Lexer.CppNoCase*/))
|
||||
if(General.Settings.ScriptShowFolding && (scriptconfig.Lexer == Lexer.Cpp || (int)scriptconfig.Lexer == 35)) // 35 - custom CPP case insensitive style lexer
|
||||
{
|
||||
// Instruct the lexer to calculate folding
|
||||
scriptedit.SetProperty("fold", "1");
|
||||
|
|
Loading…
Reference in a new issue