diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2013-07-12 20:16:28 -0400 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2013-07-12 20:16:28 -0400 |
commit | 04ff0382b24a9ce2aa47833a289288737b2e02e9 (patch) | |
tree | d85f7226b93b3e91c72e35a0e3d873e634e1d7cf /Lib/idlelib/idle_test/mock_tk.py | |
parent | 21784da4161428e97723fc743a0f00b5bb6c9dd2 (diff) | |
download | cpython-04ff0382b24a9ce2aa47833a289288737b2e02e9.tar.gz cpython-04ff0382b24a9ce2aa47833a289288737b2e02e9.zip |
Issue #18365: normalize whitespace
Diffstat (limited to 'Lib/idlelib/idle_test/mock_tk.py')
-rw-r--r-- | Lib/idlelib/idle_test/mock_tk.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/idlelib/idle_test/mock_tk.py b/Lib/idlelib/idle_test/mock_tk.py index c21ff433f29..3f6c579c3c7 100644 --- a/Lib/idlelib/idle_test/mock_tk.py +++ b/Lib/idlelib/idle_test/mock_tk.py @@ -210,7 +210,7 @@ class Text: endline, endchar = startline+1, 0 else: # do not delete terminal \n if index1 == 'insert' - return + return else: endline, endchar = self._decode(index2, -1) # restricting end position to insert position excludes terminal \n @@ -219,11 +219,11 @@ class Text: self.data[startline] = self.data[startline][:startchar] + \ self.data[startline][endchar:] elif startline < endline: - self.data[startline] = self.data[startline][:startchar] + \ - self.data[endline][endchar:] - startline += 1 - for i in range(startline, endline+1): - del self.data[startline] + self.data[startline] = self.data[startline][:startchar] + \ + self.data[endline][endchar:] + startline += 1 + for i in range(startline, endline+1): + del self.data[startline] def compare(self, index1, op, index2): line1, char1 = self._decode(index1) |