diff options
Diffstat (limited to 'TUI/module.jai')
| -rw-r--r-- | TUI/module.jai | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/TUI/module.jai b/TUI/module.jai index a12b762..2774240 100644 --- a/TUI/module.jai +++ b/TUI/module.jai @@ -172,13 +172,13 @@ get_str :: (count_limit: int = -1, allocator: Allocator = temp) -> string { start :: () { if initialized == true return; - write_strings(Commands.HideCursor, Commands.SaveCursorPosition, Commands.EnterAlternateBuffer, Commands.SetUTF8); - OS_prepare_terminal(); - input_string.data = input_buffer.data; input_string.count = 0; input_override = xx Keys.None; + OS_prepare_terminal(); + write_strings(Commands.HideCursor, Commands.SaveCursorPosition, Commands.EnterAlternateBuffer, Commands.SetUTF8); + initialized = true; } @@ -186,8 +186,8 @@ stop :: () { if initialized == false return; initialized = false; - OS_reset_terminal(); write_strings(Commands.EnterMainBuffer, Commands.RestoreCursorPosition, Commands.ShowCursor); + OS_reset_terminal(); } flush_input :: () { |
