mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
PY-14358 Explicitly insert indent before the closing custom folding comment
that is the same as for the opening comment. Otherwise, it's impossible to detect the necessary indentation in languages like Python, where the block containing a comment is itself determined by this very indentation. If it's wrong for some reason, the subsequent call of CodeStyleManager.adjustLineIndent() should handle that in all other languages.
This commit is contained in:
@@ -306,7 +306,7 @@ public class CustomFoldingSurroundDescriptor implements SurroundDescriptor {
|
||||
}
|
||||
|
||||
String startString = linePrefix + startText + lineSuffix + "\n" + startIndent;
|
||||
String endString = "\n" + linePrefix + myProvider.getEndString() + lineSuffix;
|
||||
String endString = "\n" + startIndent + linePrefix + myProvider.getEndString() + lineSuffix;
|
||||
document.insertString(endOffset, endString);
|
||||
delta += endString.length();
|
||||
document.insertString(startOffset, startString);
|
||||
|
||||
@@ -14,4 +14,4 @@ class ThisIsATest():
|
||||
# <editor-fold desc="Description">
|
||||
def another_four(self):
|
||||
print "Hello, world!"
|
||||
# </editor-fold>
|
||||
# </editor-fold>
|
||||
@@ -8,4 +8,4 @@ class C:
|
||||
|
||||
def m3(self):
|
||||
pass
|
||||
# </editor-fold>
|
||||
# </editor-fold>
|
||||
Reference in New Issue
Block a user