diff options
Diffstat (limited to 'helix-core/src/movement.rs')
-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 2d9798bf..21e97ae8 100644 --- a/helix-core/src/movement.rs +++ b/helix-core/src/movement.rs @@ -285,7 +285,7 @@ impl CharHelpers for Chars<'_> { // Find our target position(s). let head_start = head; while let Some(next_ch) = self.next() { - if reached_target(target, prev_ch.unwrap_or(next_ch), next_ch) { + if prev_ch.is_none() || reached_target(target, prev_ch.unwrap(), next_ch) { if head == head_start { anchor = head; } else { |