aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordam <devnull@localhost>2024-01-11 01:29:44 +0000
committerdam <devnull@localhost>2024-01-11 01:29:44 +0000
commit0e9f04df9c1804b73baecdf4c3ad14fff977e2f1 (patch)
tree51ee6b35e407982d8eaffd28b8ae2794222f0cf4
parente5d8eaa14407608a15a639da14bbea99dd8ef61a (diff)
downloadtask-time-tracker-0e9f04df9c1804b73baecdf4c3ad14fff977e2f1.tar.zst
task-time-tracker-0e9f04df9c1804b73baecdf4c3ad14fff977e2f1.zip
Very small fixes.
-rw-r--r--TUI/unix.jai3
-rw-r--r--ttt.jai2
2 files changed, 4 insertions, 1 deletions
diff --git a/TUI/unix.jai b/TUI/unix.jai
index dd53921..7a25b6b 100644
--- a/TUI/unix.jai
+++ b/TUI/unix.jai
@@ -266,6 +266,9 @@ OS_read_input :: (buffer: *u8, bytes_to_read: s64) -> bytes_read: s64, error: bo
return bytes_read;
}
+// timeout_milliseconds
+// 0: do not wait
+// -1: wait indefinitely
OS_wait_for_input :: (timeout_milliseconds: s32) -> is_input_available: bool {
fds := pollfd.[ .{ fd = STDIN_FILENO, events = POLLIN, revents = 0 } ];
nfds := fds.count;
diff --git a/ttt.jai b/ttt.jai
index 4540699..3e95802 100644
--- a/ttt.jai
+++ b/ttt.jai
@@ -1263,7 +1263,7 @@ main :: () {
while(key != #char "q") {
__mark := get_temporary_storage_mark();
key = TUI.get_key(1000);
- if key >= 33 && key <= 128 then print_character(cast,force(u8)key);
+ if key >= 32 && key <= 128 then print_character(cast,force(u8)key);
else write_string("-");
set_temporary_storage_mark(__mark);
}