listBox:remove最后一个元素时会尝试自动将光标上移防止光标消失

This commit is contained in:
MrZ626
2021-06-28 02:40:43 +08:00
parent 9b44971de8
commit 6cb81b461b

View File

@@ -1094,6 +1094,9 @@ end
function listBox:remove()
if self.selected then
rem(self.list,self.selected)
if not self.list[self.selected]then
self:arrowKey('up')
end
self:drag(0,0,0,0)
end
end