rpgsheet

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 6322a52407a3e95ddebbf0fd29f5502b90758f45
parent 43b2530e497cc5fe277b51113a925821d0ef349f
Author: Skylar Hill <stellarskylark@posteo.net>
Date:   Sat,  4 Jun 2022 03:03:14 -0500

Add Ctrl+U clear command shortcut

Diffstat:
Msrc/tui.nim | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/tui.nim b/src/tui.nim @@ -105,6 +105,8 @@ proc exitProc() {.noconv.} = quit(0) proc command(cmdline: string, sheet: YamlDocument): string = + if cmdline == "": + return "" let tokens = cmdline.split(" ") var cmd = tokens[0] case cmd @@ -178,6 +180,8 @@ proc runTui*(sheet: YamlDocument): void = of Key.Backspace: if commandText.len > 0: commandText = commandText[0..^2] + of Key.CtrlU: + commandText = "" else: commandText &= key.toAscii() statusText = ":" & commandText @@ -305,4 +309,4 @@ proc runTui*(sheet: YamlDocument): void = tb.write(sbb) tb.display() - sleep(20) + # sleep(5)