mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
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 changed files with 6 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue