mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: support unicode characters in kill command
This commit is contained in:
parent
bf9f8f4273
commit
ee8b8fc730
1 changed files with 3 additions and 2 deletions
|
|
@ -62,8 +62,9 @@ impl Input {
|
||||||
input.take_while(|&c| CharKind::new(c) == first).count() + 1
|
input.take_while(|&c| CharKind::new(c) == first).count() + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
let spaces = count_spaces(input.clone());
|
let n = count_spaces(input.clone());
|
||||||
spaces + count_characters(input.skip(spaces))
|
let n = n + count_characters(input.clone().skip(n));
|
||||||
|
input.take(n).fold(0, |acc, c| acc + c.len_utf8())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn kill<'a>(&mut self, opt: impl Into<Opt<'a>>) {
|
pub fn kill<'a>(&mut self, opt: impl Into<Opt<'a>>) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue