aboutsummaryrefslogtreecommitdiff
path: root/modules/TUI/module.jai
diff options
context:
space:
mode:
authordam <dam@gudinoff>2024-04-30 18:32:28 +0100
committerdam <dam@gudinoff>2024-04-30 18:32:28 +0100
commit90d17cde7d92be5e2c1bedb97c8c8d5ca324a39d (patch)
tree833250962234addd8af37ec33ae5f3ca472026f7 /modules/TUI/module.jai
parent2037cba123cb98f367024346d2d882a505fd961e (diff)
downloadtask-time-tracker-90d17cde7d92be5e2c1bedb97c8c8d5ca324a39d.tar.zst
task-time-tracker-90d17cde7d92be5e2c1bedb97c8c8d5ca324a39d.zip
Removed some 'inline' marks, and added some TODO entries.
Diffstat (limited to 'modules/TUI/module.jai')
-rw-r--r--modules/TUI/module.jai5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/TUI/module.jai b/modules/TUI/module.jai
index 121aa42..f8b8265 100644
--- a/modules/TUI/module.jai
+++ b/modules/TUI/module.jai
@@ -381,7 +381,7 @@ get_key :: (timeout_milliseconds: s32 = -1) -> Key {
read_input :: (count_limit: int = -1, terminators: .. u8) -> string {
assert_is_active();
- assert(count_limit >= 0 || terminators.count > 0, "Infinite loop detected, aborting."); // TODO Maybe just return!?
+ assert(count_limit >= 0 || terminators.count > 0, "Infinite loop detected, aborting."); // TODO Maybe just return!? Or simply return success=false with #must
if count_limit < 0 {
builder: String_Builder;
@@ -438,7 +438,7 @@ read_input_line :: (count_limit: int, is_visible: bool = true) -> string, Key {
Resize discards the input returning an empty string and a Resize key.
*/
- assert(count_limit >= 0, "Invalid value on count_limit parameter.");
+ assert(count_limit >= 0, "Invalid value on count_limit parameter."); // TODO Too agressive
str := alloc_string(count_limit);
str.count = 0;
@@ -446,6 +446,7 @@ read_input_line :: (count_limit: int, is_visible: bool = true) -> string, Key {
// TODO Some of these may be nice to have:
// > https://unix.stackexchange.com/questions/255707/what-are-the-keyboard-shortcuts-for-the-command-line
+ // At least... add the Ctrl+u to clear the entire line.
x, y := get_cursor_position();
write_strings(Commands.ShowCursor, Commands.StartBlinking, Commands.BlinkingBarShape);