Fix nil index in next_up.

This commit is contained in:
KP 2023-01-29 17:30:54 +08:00
parent 911373eb6b
commit f66c0ea0e5

View file

@ -110,6 +110,7 @@ M.up = function(direction, count)
elseif target_level then
if item.level == target_level or item.level < start_level then
found = true
index = bufdata:indexof(item)
break
end
end