From fa9ec0c377305126f4c810be198bdca68d71a275 Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Thu, 12 Dec 2024 17:59:32 -0700 Subject: Rewrite of the buffer code + proper UTF-8 support This patch rewrites much of the code in src/buffer.rs to (utlimately), be less buggy. It also changed getchar() to have proper support for UTF-8 characters. The autocomplete function was also enhanced to support completions with filenames that have spaces in their paths. It handles these by placing a backslash ('\') before each space in the filename. There is not yet any completion support with quote ('), nor double-quote characters ("). The buffer is still navigable with arrow keys, so arbitrary deletions and insertions are still possible. Deletions and insertions with multi-width UTF-8 characters work as expected. Signed-off-by: Rory Dudley --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 3aed5a3..b5abfb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,3 +17,4 @@ libc = "0.2.153" nix = { version = "0.29.0", features = ["signal"] } signal-hook = "0.3.17" termios = "0.3.3" +unicode-width = "0.2.0" -- cgit v1.2.3