feat: jump_next and jump_prev check if cursor is jumpable
This commit is contained in:
@@ -283,13 +283,17 @@ neogen.match_commands = helpers.match_commands
|
|||||||
--- Jumps to the next cursor template position
|
--- Jumps to the next cursor template position
|
||||||
---@private
|
---@private
|
||||||
function neogen.jump_next()
|
function neogen.jump_next()
|
||||||
cursor.jump()
|
if neogen.jumpable() then
|
||||||
|
cursor.jump()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Jumps to the next cursor template position
|
--- Jumps to the next cursor template position
|
||||||
---@private
|
---@private
|
||||||
function neogen.jump_prev()
|
function neogen.jump_prev()
|
||||||
cursor.jump_prev()
|
if cursor.jumpable(-1) then
|
||||||
|
cursor.jump_prev()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Checks if the cursor can jump backwards or forwards
|
--- Checks if the cursor can jump backwards or forwards
|
||||||
|
|||||||
Reference in New Issue
Block a user