Addresses issue where left motion in vim mode would clip in the wrong direction
This commit is contained in:
parent
5acae094bd
commit
b6c5c7871e
3 changed files with 8 additions and 1 deletions
|
@ -266,7 +266,7 @@ impl Motion {
|
|||
fn left(map: &DisplaySnapshot, mut point: DisplayPoint, times: usize) -> DisplayPoint {
|
||||
for _ in 0..times {
|
||||
*point.column_mut() = point.column().saturating_sub(1);
|
||||
point = map.clip_point(point, Bias::Right);
|
||||
point = map.clip_point(point, Bias::Left);
|
||||
if point.column() == 0 {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -851,4 +851,10 @@ mod test {
|
|||
.await;
|
||||
}
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_h_through_unicode(cx: &mut gpui::TestAppContext) {
|
||||
let mut cx = NeovimBackedTestContext::new(cx).await.binding(["h"]);
|
||||
cx.assert_all("Testˇ├ˇ──ˇ┐ˇTest").await;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue