aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-04-07 07:57:58 +0000
committerBlaž Hrastnik2021-04-07 07:57:58 +0000
commite8298a398c6b018c49025ff3f885e4f5f40b01fd (patch)
tree84ce25cf9aedde84b043eb8f5a1f2b20475ccf95 /helix-core
parent63e602bda6e6c4381372880f4313aec46170044d (diff)
Fix selection rendering, it would be off by 1 if reverse.
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/movement.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/helix-core/src/movement.rs b/helix-core/src/movement.rs
index ed71b02a..a1de95bd 100644
--- a/helix-core/src/movement.rs
+++ b/helix-core/src/movement.rs
@@ -128,8 +128,7 @@ pub fn move_prev_word_start(slice: RopeSlice, mut begin: usize, count: usize) ->
}
}
- // we want to include begin
- Some(Range::new(begin + 1, if with_end { end } else { end + 1 }))
+ Some(Range::new(begin, if with_end { end } else { end + 1 }))
}
pub fn move_next_word_end(slice: RopeSlice, mut begin: usize, count: usize) -> Option<Range> {