return early if soft wrap is invalid (#6856)

pull/6862/head^2
ymgyt 1 year ago committed by GitHub
parent 228a4af35f
commit 61ff2bc094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -62,7 +62,7 @@ pub fn move_vertically_visual(
annotations: &mut TextAnnotations, annotations: &mut TextAnnotations,
) -> Range { ) -> Range {
if !text_fmt.soft_wrap { if !text_fmt.soft_wrap {
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();
let pos = range.cursor(slice); let pos = range.cursor(slice);

Loading…
Cancel
Save