Prevent selection when there are no tunnels
This commit is contained in:
@@ -202,6 +202,9 @@ impl Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn next_row(&mut self) {
|
fn next_row(&mut self) {
|
||||||
|
if self.tunnels.is_empty() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let i = match self.selected {
|
let i = match self.selected {
|
||||||
Some(i) => {
|
Some(i) => {
|
||||||
if i < self.tunnels.len() - 1 {
|
if i < self.tunnels.len() - 1 {
|
||||||
@@ -216,6 +219,9 @@ impl Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn previous_row(&mut self) {
|
fn previous_row(&mut self) {
|
||||||
|
if self.tunnels.is_empty() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let i = match self.selected {
|
let i = match self.selected {
|
||||||
Some(i) => {
|
Some(i) => {
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user