mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
2e89aa3e4b
commit
9de3fab65a
1 changed files with 4 additions and 5 deletions
|
|
@ -14,14 +14,13 @@ impl From<&Exec> for Opt {
|
||||||
impl Input {
|
impl Input {
|
||||||
pub fn forward(&mut self, opt: impl Into<Opt>) -> bool {
|
pub fn forward(&mut self, opt: impl Into<Opt>) -> bool {
|
||||||
let opt = opt.into() as Opt;
|
let opt = opt.into() as Opt;
|
||||||
|
|
||||||
let snap = self.snap();
|
let snap = self.snap();
|
||||||
if snap.value.is_empty() {
|
|
||||||
return self.move_(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut it = snap.value.chars().skip(snap.cursor).enumerate();
|
let mut it = snap.value.chars().skip(snap.cursor).enumerate();
|
||||||
let mut prev = CharKind::new(it.next().unwrap().1);
|
let Some(mut prev) = it.next().map(|(_, c)| CharKind::new(c)) else {
|
||||||
|
return self.move_(0);
|
||||||
|
};
|
||||||
|
|
||||||
for (i, c) in it {
|
for (i, c) in it {
|
||||||
let c = CharKind::new(c);
|
let c = CharKind::new(c);
|
||||||
let b = if opt.end_of_word {
|
let b = if opt.end_of_word {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue