aboutsummaryrefslogtreecommitdiff
path: root/modules/TUI
diff options
context:
space:
mode:
Diffstat (limited to 'modules/TUI')
-rw-r--r--modules/TUI/module.jai6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/TUI/module.jai b/modules/TUI/module.jai
index e25672f..7c3a71d 100644
--- a/modules/TUI/module.jai
+++ b/modules/TUI/module.jai
@@ -398,7 +398,7 @@ get_key :: (timeout_milliseconds: s32 = -1) -> Key {
// By default, parse a single UTF8 character (1 to 4 bytes).
to_parse := input_string;
- to_parse.count = count_utf8_bytes(input_string[0]);
+ to_parse.count = count_character_bytes(input_string[0]);
defer advance(*input_string, to_parse.count); // Advance over parsed input.
// Try to parse escape code.
@@ -555,7 +555,7 @@ read_input_line :: (count_limit: int, is_visible: bool = true) -> string, Key {
case;
if is_escape_code(key) continue;
- buff_idx := map_character_to_buffer_idx(str, idx);
+ buff_idx := get_byte_idx(str, idx);
key_str := to_string(key,, allocator = temporary_allocator);
// Make sure we have space to append the new character at the end (in case we're trying to do it).
@@ -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.
- str.count = truncate_string(str, count_limit);
+ truncate(*str, count_limit);
}
}