Don't wrap around if there are no suggestions in CommandView

This commit is contained in:
Guldoman
2022-07-11 23:28:08 +02:00
parent 86024586fd
commit 693bd11b22
+1
View File
@@ -111,6 +111,7 @@ end
function CommandView:move_suggestion_idx(dir) function CommandView:move_suggestion_idx(dir)
local function overflow_suggestion_idx(n, count) local function overflow_suggestion_idx(n, count)
if count == 0 then return 0 end
if self.state.wrap then if self.state.wrap then
return (n - 1) % count + 1 return (n - 1) % count + 1
else else