From d1256c3c83ceee7a67d5c6da71842e965f681c57 Mon Sep 17 00:00:00 2001 From: Don HO Date: Sun, 23 Jun 2019 16:15:57 +0200 Subject: [PATCH] Fix indent indicators continue to following code blocks for Python Fix indent indicators continue to following code blocks even if there is no indent for Python Fix #5815 --- .../src/ScitillaComponent/ScintillaEditView.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index c1faf4140..f0334022d 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -1229,8 +1229,17 @@ void ScintillaEditView::setLexer(int lexerID, LangType langType, int whichList) } execute(SCI_SETPROPERTY, reinterpret_cast("fold"), reinterpret_cast("1")); execute(SCI_SETPROPERTY, reinterpret_cast("fold.compact"), reinterpret_cast("0")); - execute(SCI_SETPROPERTY, reinterpret_cast("fold.comment"), reinterpret_cast("1")); + + ScintillaViewParams & svp = (ScintillaViewParams &)_pParameter->getSVP(); + + if (svp._indentGuideLineShow) + { + int currentIndentMode = execute(SCI_GETINDENTATIONGUIDES); + int docIndentMode = isFoldIndentationBased() ? SC_IV_LOOKFORWARD : SC_IV_LOOKBOTH; + if (currentIndentMode != docIndentMode) + execute(SCI_SETINDENTATIONGUIDES, docIndentMode); + } } void ScintillaEditView::makeStyle(LangType language, const TCHAR **keywordArray)