You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""
Header line describing the program
License information etc
"""
class MyClass:
def myMethod(self):
pass
def myOtherMethod(self):
pass
When all is folded, it will be like this:
Header line describing the program
class MyClass:
I like to work with the header folded but the class open so I can see the methods (maybe some of the methods will be open too but that doesn't make any difference so let's ignore that for now), e.g. like this:
Header line describing the program
class MyClass:
def myMethod(self):
def myOtherMethod(self):
However, if I paste two or more lines between the folded header line and the open class, then the class re-folds itself, which I do not want.
Expected outcome after paste:
Header line describing the program
myStaticVariable = 1
myOtherStaticVariable = 2
class MyClass:
def myMethod(self):
def myOtherMethod(self):
Actual outcome after paste:
Header line describing the program
myStaticVariable = 1
myOtherStaticVariable = 2
class MyClass:
As noted above, it doesn't make any difference if methods within the class are open - the whole class is re-folded. Note also that pasting a single line works OK (i.e. class stays open) - it is only a problem when pasting two or more lines.
Also, there is a problem when typing in the lines manually. This happens when a new line is inserted. The problem is that the folded methods get messed up, e.g. the fold is shifted up or down so that the fold text is blank or the fold is only on the contents of the method but the name line is unfolded.
The text was updated successfully, but these errors were encountered:
Consider the following code:
When all is folded, it will be like this:
I like to work with the header folded but the class open so I can see the methods (maybe some of the methods will be open too but that doesn't make any difference so let's ignore that for now), e.g. like this:
However, if I paste two or more lines between the folded header line and the open class, then the class re-folds itself, which I do not want.
Expected outcome after paste:
Actual outcome after paste:
As noted above, it doesn't make any difference if methods within the class are open - the whole class is re-folded. Note also that pasting a single line works OK (i.e. class stays open) - it is only a problem when pasting two or more lines.
Also, there is a problem when typing in the lines manually. This happens when a new line is inserted. The problem is that the folded methods get messed up, e.g. the fold is shifted up or down so that the fold text is blank or the fold is only on the contents of the method but the name line is unfolded.
The text was updated successfully, but these errors were encountered: