We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3390ac9 commit f3d099bCopy full SHA for f3d099b
src/main.rs
@@ -14,7 +14,7 @@ impl Default for State {
14
Self {
15
tabs: Vec::default(),
16
filter: String::default(),
17
- selected: Some(0),
+ selected: None,
18
ignore_case: false,
19
}
20
@@ -122,6 +122,17 @@ impl ZellijPlugin for State {
122
let mut should_render = false;
123
match event {
124
Event::TabUpdate(tab_info) => {
125
+ self.selected =
126
+ tab_info.iter().find_map(
127
+ |tab| {
128
+ if tab.active {
129
+ Some(tab.position)
130
+ } else {
131
+ None
132
+ }
133
+ },
134
+ );
135
+
136
self.tabs = tab_info;
137
should_render = true;
138
0 commit comments