bpo-39852: IDLE 'Go to line' deletes selection, updates status (GH-18801)

It appears standard that moving the text insert cursor away from a selection clears the
selection.  Clearing prevents accidental deletion of a possibly off-screen bit of text.
The update is for Ln and Col on the status bar.
This commit is contained in:
Terry Jan Reedy 2020-03-08 14:32:42 -04:00 committed by GitHub
parent c580981ba0
commit 2522db11df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 16 deletions

View file

@ -678,8 +678,11 @@ class EditorWindow(object):
if lineno <= 0:
text.bell()
return "break"
text.mark_set("insert", "%d.0" % lineno)
text.tag_remove("sel", "1.0", "end")
text.mark_set("insert", f'{lineno}.0')
text.see("insert")
self.set_line_and_column()
return "break"
def open_module(self):