We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5274c4 commit 7c2b454Copy full SHA for 7c2b454
src/state/app.rs
@@ -257,6 +257,19 @@ impl AppState {
257
let opened_tab = self.get_tab_if_exists(&tab);
258
259
if let Some(tab_id) = opened_tab {
260
+ // Retrieve the panel index of the existing tab
261
+ let panel_index = self
262
+ .panels
263
+ .iter()
264
+ .enumerate()
265
+ .find_map(|(panel_index, panel)| {
266
+ if panel.tabs.contains(&tab_id) {
267
+ Some(panel_index)
268
+ } else {
269
+ None
270
+ }
271
+ })
272
+ .unwrap();
273
// Focus the already open tab with the same content id
274
self.focused_panel = panel_index;
275
self.focus_tab(panel_index, Some(tab_id));
0 commit comments