From 096fe57a11ded9b22a4311b41d12b1f6d1008409 Mon Sep 17 00:00:00 2001 From: max397574 Date: Sun, 23 Jan 2022 20:06:37 +0100 Subject: fix(utils): fix cursor movement at eof --- lua/startup/utils.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lua') diff --git a/lua/startup/utils.lua b/lua/startup/utils.lua index 328de70..fc3cabe 100644 --- a/lua/startup/utils.lua +++ b/lua/startup/utils.lua @@ -446,6 +446,10 @@ local function move_down() end else set_cursor(U.cursor_pos) + if new_cursor_pos[1] == line_count() then + flag = false + return + end i = 1 end while true do -- cgit v1.2.3