mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08: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:
@@ -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.
|
||||
Reference in New Issue
Block a user