commit --amend initial version

This commit is contained in:
Vaclav Tvrdik
2026-09-25 10:28:10 +02:00
parent 0655d3b74a
commit 4749835e4f
10 changed files with 209 additions and 15 deletions

View File

@@ -89,6 +89,7 @@ class Window:
def __init__(self):
self.panel = None
self.input = None
self.input_view = None
self.commands = []
def focus_view(self, view):
@@ -102,7 +103,10 @@ class Window:
def show_input_panel(self, caption, initial_text, on_done, on_change, on_cancel):
self.input = (caption, initial_text, on_done, on_change, on_cancel)
return View()
self.input_view = View(initial_text)
# the real panel hands its prefill back selected, which is why callers clear the selection
self.input_view.sel().add(Region(0, len(initial_text)))
return self.input_view
class View: