aboutsummaryrefslogtreecommitdiff
path: root/modules/TUI/module.jai
diff options
context:
space:
mode:
authordam <dam@gudinoff>2024-05-07 10:27:22 +0100
committerdam <dam@gudinoff>2024-05-07 10:27:22 +0100
commit8779553b877a2bb728ddf9d7c21b272c2eedb653 (patch)
tree523f64af3907b04cc9488d7bedd00f8c0fb0229d /modules/TUI/module.jai
parent27e3e029448cf2a80b24e6e212dee8cccda06987 (diff)
downloadtask-time-tracker-8779553b877a2bb728ddf9d7c21b272c2eedb653.tar.zst
task-time-tracker-8779553b877a2bb728ddf9d7c21b272c2eedb653.zip
Fixed biggest performance bottleneck on draw_user_interface: print white spaces.
Diffstat (limited to 'modules/TUI/module.jai')
-rw-r--r--modules/TUI/module.jai2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/TUI/module.jai b/modules/TUI/module.jai
index 7c3a71d..a5db3bf 100644
--- a/modules/TUI/module.jai
+++ b/modules/TUI/module.jai
@@ -572,7 +572,7 @@ read_input_line :: (count_limit: int, is_visible: bool = true) -> string, Key {
idx += 1;
// Truncate string to avoid incomplete utf8 codes on the string tail.
- truncate(*str, count_limit);
+ str.count = truncate(str, count_limit).count;
}
}