mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-28 20:33:29 +04:00
Merge cebd221519
into dc941d6d24
This commit is contained in:
commit
20ba72e729
@ -61,7 +61,7 @@ pub fn move_vertically_visual(
|
|||||||
text_fmt: &TextFormat,
|
text_fmt: &TextFormat,
|
||||||
annotations: &mut TextAnnotations,
|
annotations: &mut TextAnnotations,
|
||||||
) -> Range {
|
) -> Range {
|
||||||
if !text_fmt.soft_wrap {
|
if !text_fmt.soft_wrap || count != 1 {
|
||||||
return move_vertically(slice, range, dir, count, behaviour, text_fmt, annotations);
|
return move_vertically(slice, range, dir, count, behaviour, text_fmt, annotations);
|
||||||
}
|
}
|
||||||
annotations.clear_line_annotations();
|
annotations.clear_line_annotations();
|
||||||
@ -75,8 +75,8 @@ pub fn move_vertically_visual(
|
|||||||
|
|
||||||
// Compute the new position.
|
// Compute the new position.
|
||||||
let mut row_off = match dir {
|
let mut row_off = match dir {
|
||||||
Direction::Forward => count as isize,
|
Direction::Forward => 1,
|
||||||
Direction::Backward => -(count as isize),
|
Direction::Backward => -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Compute visual offset relative to block start to avoid trasversing the block twice
|
// Compute visual offset relative to block start to avoid trasversing the block twice
|
||||||
|
Loading…
Reference in New Issue
Block a user