diff options
| author | Terry Jan Reedy <tjreedy@udel.edu> | 2013-07-13 00:17:00 (GMT) |
|---|---|---|
| committer | Terry Jan Reedy <tjreedy@udel.edu> | 2013-07-13 00:17:00 (GMT) |
| commit | 4064b2448c919ef5842211be140d18b2e5bcdff6 (patch) | |
| tree | f3171dc7484edd58da67c61c072bb1dbe4af9ed3 /Lib/idlelib/idle_test/mock_tk.py | |
| parent | 0c92553d85b6d1d27c74fe47c7d84cb610de998b (diff) | |
| parent | 04ff0382b24a9ce2aa47833a289288737b2e02e9 (diff) | |
| download | cpython-4064b2448c919ef5842211be140d18b2e5bcdff6.zip cpython-4064b2448c919ef5842211be140d18b2e5bcdff6.tar.gz cpython-4064b2448c919ef5842211be140d18b2e5bcdff6.tar.bz2 | |
Merge with 3.3
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 c21ff43..3f6c579 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) |
