summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/editor.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/editor.py')
-rw-r--r--Lib/idlelib/editor.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py
index 04c786d..5b81b52 100644
--- a/Lib/idlelib/editor.py
+++ b/Lib/idlelib/editor.py
@@ -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):