mirror of https://github.com/python/cpython
bpo-39885: IDLE context menu clears selection (#18859)
Since clicking to get an IDLE context menu moves the cursor, any text selection should be and now is cleared.
This commit is contained in:
parent
2522db11df
commit
4ca060d8ad
|
@ -3,6 +3,9 @@ Released on 2020-10-05?
|
|||
======================================
|
||||
|
||||
|
||||
bpo-39885: Since clicking to get an IDLE context menu moves the
|
||||
cursor, any text selection should be and now is cleared.
|
||||
|
||||
bpo-39852: Edit "Go to line" now clears any selection, preventing
|
||||
accidental deletion. It also updates Ln and Col on the status bar.
|
||||
|
||||
|
|
|
@ -499,6 +499,7 @@ class EditorWindow(object):
|
|||
rmenu = None
|
||||
|
||||
def right_menu_event(self, event):
|
||||
self.text.tag_remove("sel", "1.0", "end")
|
||||
self.text.mark_set("insert", "@%d,%d" % (event.x, event.y))
|
||||
if not self.rmenu:
|
||||
self.make_rmenu()
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Since clicking to get an IDLE context menu moves the cursor,
|
||||
any text selection should be and now is cleared.
|
Loading…
Reference in New Issue