diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-06-27 07:02:32 +0300 |
---|---|---|
committer | terryjreedy <tjreedy@udel.edu> | 2017-06-27 00:02:32 -0400 |
commit | 213ce12adfc9281c6f381bb45d132e9de8ffd450 (patch) | |
tree | db01c6fdab2e3a9c986d5b49c5294d309ae11f56 /Lib/idlelib/parenmatch.py | |
parent | 9a02ae3d3d645f0c8178f3362694f473bab6fe3e (diff) | |
download | cpython-git-213ce12adfc9281c6f381bb45d132e9de8ffd450.tar.gz |
bpo-29910: IDLE no longer deletes a character after commenting out a region (#825)
This happened because shortcut has a class binding and 'break' was not returned.
Fix other potential conflicts between IDLE and default key bindings.
* Add news item
* Update NEWS
Diffstat (limited to 'Lib/idlelib/parenmatch.py')
-rw-r--r-- | Lib/idlelib/parenmatch.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/idlelib/parenmatch.py b/Lib/idlelib/parenmatch.py index ccec708f31..dcec34c18f 100644 --- a/Lib/idlelib/parenmatch.py +++ b/Lib/idlelib/parenmatch.py @@ -94,26 +94,28 @@ class ParenMatch: .get_surrounding_brackets()) if indices is None: self.bell() - return + return "break" self.activate_restore() self.create_tag(indices) self.set_timeout_last() + return "break" def paren_closed_event(self, event): # If it was a shortcut and not really a closing paren, quit. closer = self.text.get("insert-1c") if closer not in _openers: - return + return "break" hp = HyperParser(self.editwin, "insert-1c") if not hp.is_in_code(): - return + return "break" indices = hp.get_surrounding_brackets(_openers[closer], True) if indices is None: self.bell() - return + return "break" self.activate_restore() self.create_tag(indices) self.set_timeout() + return "break" def restore_event(self, event=None): self.text.tag_delete("paren") |