mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-13 05:42:59 +00:00
Avoid crash when running pane:activate_prev_item w/ no tabs open
This commit is contained in:
parent
2a1496be2e
commit
6882fdca38
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ impl Pane {
|
|||
pub fn activate_prev_item(&mut self, ctx: &mut ViewContext<Self>) {
|
||||
if self.active_item > 0 {
|
||||
self.active_item -= 1;
|
||||
} else {
|
||||
} else if self.items.len() > 0 {
|
||||
self.active_item = self.items.len() - 1;
|
||||
}
|
||||
self.focus_active_item(ctx);
|
||||
|
|
Loading…
Reference in a new issue