mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
bpo-38862: IDLE Strip Trailing Whitespace fixes end newlines (GH-17366)
Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
This commit is contained in:
parent
6f03b236c1
commit
6bf644ec82
7 changed files with 68 additions and 40 deletions
|
@ -40,8 +40,9 @@ class Func:
|
|||
class Editor:
|
||||
'''Minimally imitate editor.EditorWindow class.
|
||||
'''
|
||||
def __init__(self, flist=None, filename=None, key=None, root=None):
|
||||
self.text = Text()
|
||||
def __init__(self, flist=None, filename=None, key=None, root=None,
|
||||
text=None): # Allow real Text with mock Editor.
|
||||
self.text = text or Text()
|
||||
self.undo = UndoDelegator()
|
||||
|
||||
def get_selection_indices(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue