feat: jump_next and jump_prev check if cursor is jumpable
This commit is contained in:
@@ -283,14 +283,18 @@ neogen.match_commands = helpers.match_commands
|
||||
--- Jumps to the next cursor template position
|
||||
---@private
|
||||
function neogen.jump_next()
|
||||
if neogen.jumpable() then
|
||||
cursor.jump()
|
||||
end
|
||||
end
|
||||
|
||||
--- Jumps to the next cursor template position
|
||||
---@private
|
||||
function neogen.jump_prev()
|
||||
if cursor.jumpable(-1) then
|
||||
cursor.jump_prev()
|
||||
end
|
||||
end
|
||||
|
||||
--- Checks if the cursor can jump backwards or forwards
|
||||
--- @param reverse number? if `-1`, will try to see if can be jumped backwards
|
||||
|
||||
Reference in New Issue
Block a user