Add term support #19

Merged
ThePerfectComputer merged 7 commits from add_term_support into main 2024-12-30 23:10:28 +00:00
5 changed files with 37 additions and 31 deletions
Showing only changes of commit e4ac219bf9 - Show all commits

1
Cargo.lock generated
View file

@ -1823,6 +1823,7 @@ version = "0.1.0"
dependencies = [
"gloo-file",
"shared",
"unicode-segmentation",
"wasm-bindgen-test",
"web-sys",
"wellen",

View file

@ -14,6 +14,7 @@ wasm-bindgen-test = "0.3.19"
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(FASTWAVE_PLATFORM)'] }
[dependencies]
unicode-segmentation = "1.10"
zoon.workspace = true
wellen.workspace = true
shared = { path = "../shared", features = ["frontend"] }

View file

@ -106,7 +106,6 @@ fn main() {
platform::listen_term_update(|down_msg| {
term::TERMINAL_STATE.set(down_msg);
}).await;
zoon::println!("Printing on line 106");
});
}

View file

@ -4,6 +4,7 @@ use chrono::format;
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
use zoon::*;
use zoon::{println, eprintln, *};
use shared::term::{TerminalDownMsg, TerminalScreen, TerminalUpMsg};
use unicode_segmentation::UnicodeSegmentation;
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
// use tokio::time::timeout;
pub static TERM_OPEN: Lazy<Mutable<bool>> = Lazy::new(|| {false.into()});
@ -16,7 +17,6 @@ pub static TERMINAL_STATE: Lazy<Mutable<TerminalDownMsg>> =
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
});
pub fn root() -> impl Element {
term_request();
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let terminal =
El::new()
.s(Width::fill())
@ -61,10 +61,6 @@ pub fn root() -> impl Element {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
root
}
// TODO : fill this out
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
fn term_request() {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
}
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
fn send_char(
s : &str,
MartinKavik commented 2024-12-25 15:58:11 +00:00 (Migrated from github.com)
Review

can we use c: char instead? Ideally everywhere where it makes sense instead of String allocation and passing strings in the methods called send_char.

can we use `c: char` instead? Ideally everywhere where it makes sense instead of String allocation and passing strings in the methods called `send_char`.
has_control : bool,
@ -82,18 +78,22 @@ fn send_char(
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
}
fn make_grid_with_newlines(term : &TerminalScreen) -> String {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let mut formatted = String::new();
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
for (i, c) in term.content.chars().enumerate() {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
fn make_grid_with_newlines(term: &TerminalScreen) -> String {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let mut formatted = String::with_capacity(term.content.len() + (term.content.len() / term.cols as usize));
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
term.content.chars().enumerate().for_each(|(i, c)| {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
formatted.push(c);
if ((i + 1) as u16) % term.cols == 0 {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
if (i + 1) as u16 % term.cols == 0 {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
formatted.push('\n');
}
}
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
});
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
formatted
}
fn process_str(s: &str, has_ctrl : bool) -> Option<char> {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
fn process_str(s: &str, has_ctrl: bool) -> Option<char> {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
println!("process_str: {s}");
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
match s {
"Enter" => {return Some('\n');}
"Escape" => {return Some('\x1B');}
@ -102,37 +102,40 @@ fn process_str(s: &str, has_ctrl : bool) -> Option<char> {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
"ArrowDown" => {return Some('\x0E');}
"ArrowLeft" => {return Some('\x02');}
"ArrowRight" => {return Some('\x06');}
"Control" => {return None;}
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
"Shift" => {return None;}
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
"Meta" => {return None;}
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
"Alt" => {return None;}
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
_ => {}
}
// Check if the string has exactly one character
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
if s.chars().count() == 1 {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
// Safe unwrap because we know the length is 1
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let c = s.chars().next().unwrap();
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let c = process_for_ctrl_char(c, has_ctrl);
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
return Some(c);
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let mut graphemes = s.graphemes(true);
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let first = graphemes.next();
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
if let Some(g) = first {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
if g.len() == 1 {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
if let Some(c) = g.chars().next() {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let c = process_for_ctrl_char(c, has_ctrl);
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
return Some(c);
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
}
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
}
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
}
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
None
}
// Helper function to process control characters
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
fn is_lowercase_alpha(c: char) -> bool {
char_is_between_inclusive(c, 'a', 'z')
}
fn process_for_ctrl_char(c: char, has_ctrl : bool) -> char {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let mut final_ctrl_char = c;
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
fn process_for_ctrl_char(c: char, has_ctrl: bool) -> char {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
if has_ctrl {
if is_lowercase_alpha(c) {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let c_u8 = (c as u8);
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let ctrl_char_u8 = c_u8 - 96;
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
final_ctrl_char = (ctrl_char_u8 as char);
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
} else if char_is_between_inclusive(c, '[', '_') {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let c_u8 = (c as u8);
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
let ctrl_char_u8 = c_u8 - 90;
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
final_ctrl_char = (ctrl_char_u8 as char);
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
}
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
(c as u8 & 0x1F) as char
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
} else {
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
c
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
}
return final_ctrl_char
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
}
fn char_is_between_inclusive(c : char, lo_char : char, hi_char : char) -> bool {

MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.
MartinKavik commented 2024-12-25 15:41:10 +00:00 (Migrated from github.com)
Review

please add more context so we both know what should be implemented here without trying to read all related code

please add more context so we both know what should be implemented here without trying to read all related code
MartinKavik commented 2024-12-25 15:55:51 +00:00 (Migrated from github.com)
Review

.chars basically brakes non-ASCII chars. It means when you try to format path like C:\nová složka\můj nový soubor (C:\new folder\my new file in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation

(only applies if the term can be a user-defined text)

[.chars](https://doc.rust-lang.org/std/primitive.str.html#method.chars) basically brakes non-ASCII chars. It means when you try to format path like `C:\nová složka\můj nový soubor` (`C:\new folder\my new file` in Czech) then if fails. You should be able to use https://crates.io/crates/unicode-segmentation (only applies if the `term` can be a user-defined text)
MartinKavik commented 2024-12-25 16:12:03 +00:00 (Migrated from github.com)
Review

if .chars().count() is really what you want (see the previous review comment) then you can replace the if's body with something like:

return Some(process_for_ctrl_char(s[0], has_ctrl))
if `.chars().count()` is really what you want (see the previous review comment) then you can replace the `if`'s body with something like: ```rust return Some(process_for_ctrl_char(s[0], has_ctrl)) ```
MartinKavik commented 2024-12-25 16:18:54 +00:00 (Migrated from github.com)
Review

Perhaps you can use methods like is_ascii_alphabetic or is_ascii_lowercase or even is_ascii_control

Perhaps you can use methods like [is_ascii_alphabetic](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphabetic) or [is_ascii_lowercase](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_lowercase) or even [is_ascii_control](https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_control)
ThePerfectComputer commented 2024-12-27 15:22:35 +00:00 (Migrated from github.com)
Review

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

Fully addressing NFC vs NFD unicode behavior will open a can of worms that is non-trivial to resolve. Hopefully, most users have keyboards that input a single unicode point instead of base followed by diacritic.

2
src-tauri/f.txt Normal file
View file

@ -0,0 +1,2 @@
Hello, I'm typing a file in vim!!