Prevent selection when there are no tunnels

This commit is contained in:
Dreaded_X 2025-04-13 02:03:18 +02:00
parent 22ea4b4e76
commit f162950f43
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4

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 {