From 46be071780ddb193dc8c0d0a51589588de3568a8 Mon Sep 17 00:00:00 2001 From: Shigeru Hagiwara Date: Sat, 17 Aug 2024 11:08:37 +0900 Subject: [PATCH] fix go to line --- src/command/commands/go_to_line.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/commands/go_to_line.rs b/src/command/commands/go_to_line.rs index 1eadba3..e44c309 100644 --- a/src/command/commands/go_to_line.rs +++ b/src/command/commands/go_to_line.rs @@ -24,7 +24,7 @@ impl Command for GoToLineCommand { editor.window_position_in_buffer.col = 0; if line_number > 0 { let mut next_line = NextLine {}; - for _ in 0..line_number - 1 { + for _ in 0..line_number { next_line.execute(editor)?; } }