fix(nvim): properly handle invalid vim.v.count
for ufo foldlevel
This commit is contained in:
parent
759c16b101
commit
c837454c76
@ -49,9 +49,9 @@ return {
|
||||
function()
|
||||
local count = vim.v.count
|
||||
if count == 0 then
|
||||
count = nil
|
||||
count = 1
|
||||
end
|
||||
change_buf_foldlevel_by(-(count) or -1)
|
||||
change_buf_foldlevel_by(-(count))
|
||||
end,
|
||||
desc = "UFO: Fold Less",
|
||||
},
|
||||
@ -60,9 +60,9 @@ return {
|
||||
function()
|
||||
local count = vim.v.count
|
||||
if count == 0 then
|
||||
count = nil
|
||||
count = 1
|
||||
end
|
||||
change_buf_foldlevel_by(count or 1)
|
||||
change_buf_foldlevel_by(count)
|
||||
end,
|
||||
desc = "UFO: Fold More",
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user