diff options
author | ath3 | 2021-11-14 15:16:20 +0000 |
---|---|---|
committer | GitHub | 2021-11-14 15:16:20 +0000 |
commit | 6fa76d9fe77d43ebc18cc78a6a1c1957d72cf59b (patch) | |
tree | 8998e33a6b7b19e87c79dae0b8c1edc824ab4e3e /helix-core | |
parent | edc976b6bb36c6017bf59691abbde5c086267bfd (diff) |
Add trim_selections command (#1092)
Diffstat (limited to 'helix-core')
-rw-r--r-- | helix-core/src/movement.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-core/src/movement.rs b/helix-core/src/movement.rs index 9e85bd21..01a8f890 100644 --- a/helix-core/src/movement.rs +++ b/helix-core/src/movement.rs @@ -168,7 +168,7 @@ pub fn backwards_skip_while<F>(slice: RopeSlice, pos: usize, fun: F) -> Option<u where F: Fn(char) -> bool, { - let mut chars_starting_from_next = slice.chars_at(pos + 1); + let mut chars_starting_from_next = slice.chars_at(pos); let mut backwards = iter::from_fn(|| chars_starting_from_next.prev()).enumerate(); backwards.find_map(|(i, c)| { if !fun(c) { |