From 38dd080c06708e24bb985587670855e2edb3a0b9 Mon Sep 17 00:00:00 2001 From: dam Date: Mon, 27 Nov 2023 00:17:37 +0000 Subject: Replaced mutex with atomic flag. --- TUI/module.jai | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'TUI/module.jai') 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 :: () { -- cgit v1.2.3