mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
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:
parent
c580981ba0
commit
2522db11df
5 changed files with 31 additions and 16 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue