diff options
| author | dam <dam@gudinoff> | 2023-11-27 00:17:37 +0000 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2023-11-27 00:17:37 +0000 |
| commit | 38dd080c06708e24bb985587670855e2edb3a0b9 (patch) | |
| tree | f996673f59b82ac6af5dd6de042726bbf82e9321 /TUI/module.jai | |
| parent | 53f82bca92edbe4a8883c713c30d5ac81897a43f (diff) | |
| download | task-time-tracker-38dd080c06708e24bb985587670855e2edb3a0b9.tar.zst task-time-tracker-38dd080c06708e24bb985587670855e2edb3a0b9.zip | |
Replaced mutex with atomic flag.
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 :: () { |
