Prevent selection when there are no tunnels

This commit is contained in:
2025-04-13 02:03:18 +02:00
parent 22ea4b4e76
commit f162950f43

View File

@@ -202,6 +202,9 @@ impl Handler {
}
fn next_row(&mut self) {
if self.tunnels.is_empty() {
return;
}
let i = match self.selected {
Some(i) => {
if i < self.tunnels.len() - 1 {
@@ -216,6 +219,9 @@ impl Handler {
}
fn previous_row(&mut self) {
if self.tunnels.is_empty() {
return;
}
let i = match self.selected {
Some(i) => {
if i > 0 {