mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 21:18:53 +00:00
run cargo fmt --check --all
This commit is contained in:
parent
2549e5f07c
commit
d3ec310540
1 changed files with 14 additions and 5 deletions
|
@ -2777,11 +2777,16 @@ impl<'a> Reader<'a> {
|
||||||
newv,
|
newv,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
rl::DeleteWord | rl::DeleteBigword
|
rl::DeleteWord
|
||||||
| rl::BackwardDeleteWord | rl::BackwardDeleteBigword | rl::BackwordDeletePathComponent => {
|
| rl::DeleteBigword
|
||||||
|
| rl::BackwardDeleteWord
|
||||||
|
| rl::BackwardDeleteBigword
|
||||||
|
| rl::BackwordDeletePathComponent => {
|
||||||
let move_right = match c {
|
let move_right = match c {
|
||||||
rl::DeleteWord | rl::DeleteBigword => true,
|
rl::DeleteWord | rl::DeleteBigword => true,
|
||||||
rl::BackwardDeleteWord | rl::BackwardDeleteBigword | rl::BackwordDeletePathComponent => false,
|
rl::BackwardDeleteWord
|
||||||
|
| rl::BackwardDeleteBigword
|
||||||
|
| rl::BackwordDeletePathComponent => false,
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
};
|
};
|
||||||
let style = match c {
|
let style = match c {
|
||||||
|
@ -2812,7 +2817,7 @@ impl<'a> Reader<'a> {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if buff_pos == start_buff_pos {
|
if buff_pos == start_buff_pos {
|
||||||
buff_pos = if move_right {
|
buff_pos = if move_right {
|
||||||
buff_pos + 1
|
buff_pos + 1
|
||||||
} else {
|
} else {
|
||||||
|
@ -2820,7 +2825,11 @@ impl<'a> Reader<'a> {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let range = if move_right { start_buff_pos..buff_pos } else { buff_pos..start_buff_pos };
|
let range = if move_right {
|
||||||
|
start_buff_pos..buff_pos
|
||||||
|
} else {
|
||||||
|
buff_pos..start_buff_pos
|
||||||
|
};
|
||||||
self.erase_substring(elt, range);
|
self.erase_substring(elt, range);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue