mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-39781: Do not jump when select in IDLE codecontext (GH-18683)
Previously, the button-up part of selecting with a mouse was treated as a click that meant 'jump' to this line, which modified the context and undid the selection
This commit is contained in:
parent
4f17c5cd9a
commit
c705fd1e89
4 changed files with 36 additions and 19 deletions
|
@ -332,6 +332,14 @@ class CodeContextTest(unittest.TestCase):
|
|||
jump()
|
||||
eq(cc.topvisible, 8)
|
||||
|
||||
# Context selection stops jump.
|
||||
cc.text.yview('5.0')
|
||||
cc.update_code_context()
|
||||
cc.context.tag_add('sel', '1.0', '2.0')
|
||||
cc.context.mark_set('insert', '1.0')
|
||||
jump() # Without selection, to line 2.
|
||||
eq(cc.topvisible, 5)
|
||||
|
||||
@mock.patch.object(codecontext.CodeContext, 'update_code_context')
|
||||
def test_timer_event(self, mock_update):
|
||||
# Ensure code context is not active.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue