From 61ff2bc0941be0ca99f34d8ba013978356612caf Mon Sep 17 00:00:00 2001 From: ymgyt Date: Sun, 23 Apr 2023 22:24:17 +0900 Subject: [PATCH] return early if soft wrap is invalid (#6856) --- helix-core/src/movement.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-core/src/movement.rs b/helix-core/src/movement.rs index 60af47e5b..b44d149fb 100644 --- a/helix-core/src/movement.rs +++ b/helix-core/src/movement.rs @@ -62,7 +62,7 @@ pub fn move_vertically_visual( annotations: &mut TextAnnotations, ) -> Range { 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(); let pos = range.cursor(slice);