From 3bbd8ff839354a6f488c8481d5e6336a3f637cee Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sun, 23 Oct 2022 13:24:48 +0100 Subject: Replace wchar and friends with Unicode handling. All text handling should now be explicitly UTF-8 or UTF-32, removing the ambiguity around wchar_t and related functions. --- src/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 900066b..8ac0b73 100644 --- a/src/main.c +++ b/src/main.c @@ -12,8 +12,6 @@ #include #include #include -#include -#include #include #include "tofi.h" #include "compgen.h" @@ -816,7 +814,7 @@ static bool do_submit(struct tofi *tofi) if (tofi->require_match || entry->drun) { return false; } else { - printf("%ls\n", entry->input); + printf("%s\n", entry->input_utf8); return true; } } @@ -874,7 +872,7 @@ int main(int argc, char *argv[]) .font_name = "Sans", .font_size = 24, .prompt_text = "run: ", - .hidden_character_mb = "*", + .hidden_character_utf8 = u8"*", .padding_top = 8, .padding_bottom = 8, .padding_left = 8, -- cgit v1.2.3