-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Describe the bug
When searching for the phase "tüt" my program panics.
To Reproduce
$ cargo build --all-features --example less-rs
$ echo "foo" > foo.txt
$ ./target/debug/examples/less-rs foo.txt
$ # Enter "/tüt"
thread '<unnamed>' panicked at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/alloc/src/string.rs:1653:9:
assertion failed: self.is_char_boundary(idx)
stack backtrace:
0: rust_begin_unwind
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:662:5
1: core::panicking::panic_fmt
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/panicking.rs:74:14
2: core::panicking::panic
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/panicking.rs:148:5
3: alloc::string::String::insert
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/alloc/src/string.rs:1653:9
4: minus::search::handle_key_press
at ./src/search.rs:542:13
5: minus::search::fetch_input
at ./src/search.rs:596:13
6: minus::minus_core::ev_handler::handle_event
at ./src/core/ev_handler.rs:103:33
7: minus::minus_core::init::start_reactor
at ./src/core/init.rs:258:17
8: minus::minus_core::init::init_core::{{closure}}::{{closure}}
at ./src/core/init.rs:177:23
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.Expected behavior
The library should not panic.
Desktop:
- OS: Ubuntu 22.04.4 LTS (Linux 5.15.0-113-generic)
- Shell: ZSH
minusVersion 5.6.1
Additional context
German umlauts like "ü" (U+00FC), ä, etc. might be the problem.
Metadata
Metadata
Assignees
Labels
No labels