Update tui.py to add application mode control when editing prompt
This commit is contained in:
parent
8b7e27d5c6
commit
0299d506be
1 changed files with 4 additions and 2 deletions
|
|
@ -121,9 +121,11 @@ class StopwatchApp(App):
|
||||||
file = tempfile.NamedTemporaryFile(prefix="lockhart", suffix=".toml")
|
file = tempfile.NamedTemporaryFile(prefix="lockhart", suffix=".toml")
|
||||||
file.write(tomlkit.dumps(prompt).encode())
|
file.write(tomlkit.dumps(prompt).encode())
|
||||||
file.seek(0)
|
file.seek(0)
|
||||||
proc = subprocess.Popen([editor, file.name])
|
self._driver.stop_application_mode()
|
||||||
proc.wait()
|
with subprocess.Popen([editor, file.name]) as proc:
|
||||||
|
proc.wait()
|
||||||
self.refresh()
|
self.refresh()
|
||||||
|
self._driver.start_application_mode()
|
||||||
|
|
||||||
def action_toggle(self):
|
def action_toggle(self):
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue