summaryrefslogtreecommitdiff
path: root/Lib/idlelib/editor.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2020-03-08 15:30:04 -0400
committerGitHub <noreply@github.com>2020-03-08 15:30:04 -0400
commit4ca060d8ad7c6df1fd4df30f9a14f6aa35380c09 (patch)
tree98ed28d77a76cf19434ec03a464b2fb862d515e4 /Lib/idlelib/editor.py
parent2522db11df102be3baf25ce9e816ebe8ffdb7fcc (diff)
downloadcpython-git-4ca060d8ad7c6df1fd4df30f9a14f6aa35380c09.tar.gz
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.
Diffstat (limited to 'Lib/idlelib/editor.py')
-rw-r--r--Lib/idlelib/editor.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py
index 5b81b52f91..51941900d5 100644
--- a/Lib/idlelib/editor.py
+++ b/Lib/idlelib/editor.py
@@ -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()