mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(indent): check that win is valid in step. Closes #1943
This commit is contained in:
parent
32e5bf1730
commit
e409f31cc9
1 changed files with 3 additions and 0 deletions
|
|
@ -392,6 +392,9 @@ end
|
|||
---@param value number
|
||||
---@param prev? number
|
||||
local function step(scope, value, prev)
|
||||
if not vim.api.nvim_win_is_valid(scope.win) then
|
||||
return
|
||||
end
|
||||
prev = prev or 0
|
||||
local cursor = vim.api.nvim_win_get_cursor(scope.win)
|
||||
local dt = math.abs(scope.from - cursor[1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue