fix(indent): check that win is valid in step. Closes #1943

This commit is contained in:
Folke Lemaitre 2025-09-17 08:22:51 +02:00
parent 32e5bf1730
commit e409f31cc9
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -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])