summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/ui/panel.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/ui/panel.lua b/xmake/core/ui/panel.lua
index 17a35531e..5057fe2bc 100644
--- a/xmake/core/ui/panel.lua
+++ b/xmake/core/ui/panel.lua
@@ -201,8 +201,8 @@ function panel:select_next(start)
-- select the next view
local next = self:next(current)
- while next and next ~= current do
- if next:option("selectable") and next:state("visible") then
+ while next ~= current do
+ if next and next:option("selectable") and next:state("visible") then
return self:select(next)
end
next = self:next(next)
@@ -222,8 +222,8 @@ function panel:select_prev(start)
-- select the previous view
local prev = self:prev(current)
- while prev and prev ~= current do
- if prev:option("selectable") and prev:state("visible") then
+ while prev ~= current do
+ if prev and prev:option("selectable") and prev:state("visible") then
return self:select(prev)
end
prev = self:prev(prev)