Use empty_visible in the view focus movers

empty() counts filtered entries, so size() - 1 underflows.
This commit is contained in:
noctuum
2026-09-16 11:31:29 +05:00
committed by Jari Sundell
parent 00bcdaee23
commit 26fdca8f4d
+2 -2
View File
@@ -216,7 +216,7 @@ View::set_not_visible(Download* download) {
void
View::next_focus(unsigned int i) {
if (empty())
if (empty_visible())
return;
// If at the boundary, roll over
@@ -239,7 +239,7 @@ View::next_focus(unsigned int i) {
void
View::prev_focus(unsigned int i) {
if (empty())
if (empty_visible())
return;
// If at the boundary, roll over