bpo-39885: IDLE context menu clears selection (GH-18859)
Since clicking to get an IDLE context menu moves the cursor,
any text selection should be and now is cleared.
(cherry picked from commit 4ca060d8ad
)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
ec61f53243
commit
f9684d222e
|
@ -3,6 +3,9 @@ Released on 2019-12-16?
|
|||
======================================
|
||||
|
||||
|
||||
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