feat(ui): resize shortcuts (#4003)
* feat(ui): show resize and focus shortcuts when relevant * update serialization and snapshots * update e2e tests * style(fmt): rustfmt
This commit is contained in:
parent
5b6a0e6dc3
commit
544982dad4
52 changed files with 241 additions and 89 deletions
|
|
@ -682,9 +682,22 @@ fn render_secondary_info(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn should_show_focus_and_resize_shortcuts(tab_info: Option<&TabInfo>) -> bool {
|
||||||
|
let Some(tab_info) = tab_info else {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
let are_floating_panes_visible = tab_info.are_floating_panes_visible;
|
||||||
|
if are_floating_panes_visible {
|
||||||
|
tab_info.selectable_floating_panes_count > 1
|
||||||
|
} else {
|
||||||
|
tab_info.selectable_tiled_panes_count > 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usize) -> LinePart {
|
fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usize) -> LinePart {
|
||||||
let mut secondary_info = LinePart::default();
|
let mut secondary_info = LinePart::default();
|
||||||
let binds = &help.get_mode_keybinds();
|
let binds = &help.get_mode_keybinds();
|
||||||
|
let should_show_focus_and_resize_shortcuts = should_show_focus_and_resize_shortcuts(tab_info);
|
||||||
// New Pane
|
// New Pane
|
||||||
let new_pane_action_key = action_key(binds, &[Action::NewPane(None, None, false)]);
|
let new_pane_action_key = action_key(binds, &[Action::NewPane(None, None, false)]);
|
||||||
let mut new_pane_key_to_display = new_pane_action_key
|
let mut new_pane_key_to_display = new_pane_action_key
|
||||||
|
|
@ -698,6 +711,25 @@ fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usiz
|
||||||
vec![]
|
vec![]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Resize
|
||||||
|
let resize_increase_action_key = action_key(binds, &[Action::Resize(Resize::Increase, None)]);
|
||||||
|
let resize_increase_key = resize_increase_action_key
|
||||||
|
.iter()
|
||||||
|
.find(|k| k.bare_key == BareKey::Char('+'))
|
||||||
|
.or_else(|| resize_increase_action_key.iter().next());
|
||||||
|
let resize_decrease_action_key = action_key(binds, &[Action::Resize(Resize::Decrease, None)]);
|
||||||
|
let resize_decrease_key = resize_decrease_action_key
|
||||||
|
.iter()
|
||||||
|
.find(|k| k.bare_key == BareKey::Char('-'))
|
||||||
|
.or_else(|| resize_increase_action_key.iter().next());
|
||||||
|
let mut resize_shortcuts = vec![];
|
||||||
|
if let Some(resize_increase_key) = resize_increase_key {
|
||||||
|
resize_shortcuts.push(resize_increase_key.clone());
|
||||||
|
}
|
||||||
|
if let Some(resize_decrease_key) = resize_decrease_key {
|
||||||
|
resize_shortcuts.push(resize_decrease_key.clone());
|
||||||
|
}
|
||||||
|
|
||||||
// Move focus
|
// Move focus
|
||||||
let mut move_focus_shortcuts: Vec<KeyWithModifier> = vec![];
|
let mut move_focus_shortcuts: Vec<KeyWithModifier> = vec![];
|
||||||
|
|
||||||
|
|
@ -757,6 +789,7 @@ fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usiz
|
||||||
[
|
[
|
||||||
new_pane_key_to_display.clone(),
|
new_pane_key_to_display.clone(),
|
||||||
move_focus_shortcuts.clone(),
|
move_focus_shortcuts.clone(),
|
||||||
|
resize_shortcuts.clone(),
|
||||||
toggle_floating_key_to_display.clone(),
|
toggle_floating_key_to_display.clone(),
|
||||||
]
|
]
|
||||||
.iter()
|
.iter()
|
||||||
|
|
@ -773,6 +806,7 @@ fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usiz
|
||||||
false,
|
false,
|
||||||
Some(0),
|
Some(0),
|
||||||
));
|
));
|
||||||
|
if should_show_focus_and_resize_shortcuts {
|
||||||
secondary_info.append(&add_shortcut(
|
secondary_info.append(&add_shortcut(
|
||||||
help,
|
help,
|
||||||
"Change Focus",
|
"Change Focus",
|
||||||
|
|
@ -780,6 +814,14 @@ fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usiz
|
||||||
false,
|
false,
|
||||||
Some(0),
|
Some(0),
|
||||||
));
|
));
|
||||||
|
secondary_info.append(&add_shortcut(
|
||||||
|
help,
|
||||||
|
"Resize",
|
||||||
|
&resize_shortcuts,
|
||||||
|
false,
|
||||||
|
Some(0),
|
||||||
|
));
|
||||||
|
}
|
||||||
secondary_info.append(&add_shortcut(
|
secondary_info.append(&add_shortcut(
|
||||||
help,
|
help,
|
||||||
"Floating",
|
"Floating",
|
||||||
|
|
@ -808,6 +850,10 @@ fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usiz
|
||||||
.iter()
|
.iter()
|
||||||
.map(|k| k.strip_common_modifiers(&common_modifiers))
|
.map(|k| k.strip_common_modifiers(&common_modifiers))
|
||||||
.collect();
|
.collect();
|
||||||
|
let resize_shortcuts: Vec<KeyWithModifier> = resize_shortcuts
|
||||||
|
.iter()
|
||||||
|
.map(|k| k.strip_common_modifiers(&common_modifiers))
|
||||||
|
.collect();
|
||||||
let toggle_floating_key_to_display: Vec<KeyWithModifier> = toggle_floating_key_to_display
|
let toggle_floating_key_to_display: Vec<KeyWithModifier> = toggle_floating_key_to_display
|
||||||
.iter()
|
.iter()
|
||||||
.map(|k| k.strip_common_modifiers(&common_modifiers))
|
.map(|k| k.strip_common_modifiers(&common_modifiers))
|
||||||
|
|
@ -818,12 +864,20 @@ fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usiz
|
||||||
new_pane_key_to_display,
|
new_pane_key_to_display,
|
||||||
false,
|
false,
|
||||||
));
|
));
|
||||||
|
if should_show_focus_and_resize_shortcuts {
|
||||||
secondary_info.append(&add_shortcut_with_inline_key(
|
secondary_info.append(&add_shortcut_with_inline_key(
|
||||||
help,
|
help,
|
||||||
"Change Focus",
|
"Change Focus",
|
||||||
move_focus_shortcuts,
|
move_focus_shortcuts,
|
||||||
false,
|
false,
|
||||||
));
|
));
|
||||||
|
secondary_info.append(&add_shortcut_with_inline_key(
|
||||||
|
help,
|
||||||
|
"Resize",
|
||||||
|
resize_shortcuts,
|
||||||
|
false,
|
||||||
|
));
|
||||||
|
}
|
||||||
secondary_info.append(&add_shortcut_with_inline_key(
|
secondary_info.append(&add_shortcut_with_inline_key(
|
||||||
help,
|
help,
|
||||||
"Floating",
|
"Floating",
|
||||||
|
|
@ -844,6 +898,7 @@ fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usiz
|
||||||
false,
|
false,
|
||||||
Some(0),
|
Some(0),
|
||||||
));
|
));
|
||||||
|
if should_show_focus_and_resize_shortcuts {
|
||||||
short_line.append(&add_shortcut(
|
short_line.append(&add_shortcut(
|
||||||
help,
|
help,
|
||||||
"Focus",
|
"Focus",
|
||||||
|
|
@ -851,6 +906,14 @@ fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usiz
|
||||||
false,
|
false,
|
||||||
Some(0),
|
Some(0),
|
||||||
));
|
));
|
||||||
|
short_line.append(&add_shortcut(
|
||||||
|
help,
|
||||||
|
"Resize",
|
||||||
|
&resize_shortcuts,
|
||||||
|
false,
|
||||||
|
Some(0),
|
||||||
|
));
|
||||||
|
}
|
||||||
short_line.append(&add_shortcut(
|
short_line.append(&add_shortcut(
|
||||||
help,
|
help,
|
||||||
"Floating",
|
"Floating",
|
||||||
|
|
@ -879,6 +942,10 @@ fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usiz
|
||||||
.iter()
|
.iter()
|
||||||
.map(|k| k.strip_common_modifiers(&common_modifiers))
|
.map(|k| k.strip_common_modifiers(&common_modifiers))
|
||||||
.collect();
|
.collect();
|
||||||
|
let resize_shortcuts: Vec<KeyWithModifier> = resize_shortcuts
|
||||||
|
.iter()
|
||||||
|
.map(|k| k.strip_common_modifiers(&common_modifiers))
|
||||||
|
.collect();
|
||||||
let toggle_floating_key_to_display: Vec<KeyWithModifier> =
|
let toggle_floating_key_to_display: Vec<KeyWithModifier> =
|
||||||
toggle_floating_key_to_display
|
toggle_floating_key_to_display
|
||||||
.iter()
|
.iter()
|
||||||
|
|
@ -890,12 +957,20 @@ fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usiz
|
||||||
new_pane_key_to_display,
|
new_pane_key_to_display,
|
||||||
false,
|
false,
|
||||||
));
|
));
|
||||||
|
if should_show_focus_and_resize_shortcuts {
|
||||||
short_line.append(&add_shortcut_with_inline_key(
|
short_line.append(&add_shortcut_with_inline_key(
|
||||||
help,
|
help,
|
||||||
"Focus",
|
"Focus",
|
||||||
move_focus_shortcuts,
|
move_focus_shortcuts,
|
||||||
false,
|
false,
|
||||||
));
|
));
|
||||||
|
short_line.append(&add_shortcut_with_inline_key(
|
||||||
|
help,
|
||||||
|
"Resize",
|
||||||
|
resize_shortcuts,
|
||||||
|
false,
|
||||||
|
));
|
||||||
|
}
|
||||||
short_line.append(&add_shortcut_with_inline_key(
|
short_line.append(&add_shortcut_with_inline_key(
|
||||||
help,
|
help,
|
||||||
"Floating",
|
"Floating",
|
||||||
|
|
@ -903,7 +978,21 @@ fn secondary_keybinds(help: &ModeInfo, tab_info: Option<&TabInfo>, max_len: usiz
|
||||||
are_floating_panes_visible,
|
are_floating_panes_visible,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
if short_line.len <= max_len {
|
||||||
short_line
|
short_line
|
||||||
|
} else {
|
||||||
|
let part = serialize_text(
|
||||||
|
&Text::new(format!(
|
||||||
|
"{:>width$}",
|
||||||
|
"...",
|
||||||
|
width = max_len.saturating_sub(3)
|
||||||
|
))
|
||||||
|
.color_range(0, ..)
|
||||||
|
.opaque(),
|
||||||
|
);
|
||||||
|
let len = max_len.saturating_sub(3);
|
||||||
|
LinePart { part, len }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -982,6 +1071,7 @@ fn add_shortcut_with_inline_key(
|
||||||
"←→" => "",
|
"←→" => "",
|
||||||
"↓↑" => "",
|
"↓↑" => "",
|
||||||
"[]" => "",
|
"[]" => "",
|
||||||
|
"+-" => "",
|
||||||
_ => "|",
|
_ => "|",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1975
|
assertion_line: 2000
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 243
|
assertion_line: 239
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij
|
Zellij
|
||||||
|
|
@ -22,4 +22,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────┘
|
└──────┘
|
||||||
Ctrl +
|
...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 707
|
assertion_line: 714
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1138
|
assertion_line: 1154
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ ││ │
|
│ ││ │
|
||||||
│ ││ │
|
│ ││ │
|
||||||
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1352
|
assertion_line: 1373
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ ││ │
|
│ ││ │
|
||||||
│ ││ │
|
│ ││ │
|
||||||
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 2426
|
assertion_line: 2424
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl g UNLOCK Alt + <n> New Pane <←↓↑→> Change Focus <f> Floating
|
Ctrl g UNLOCK Alt + <n> New Pane <f> Floating
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1624
|
assertion_line: 1650
|
||||||
expression: first_runner_snapshot
|
expression: first_runner_snapshot
|
||||||
---
|
---
|
||||||
Zellij (mirrored_sessions) Tab #1 Tab #2
|
Zellij (mirrored_sessions) Tab #1 Tab #2
|
||||||
|
|
@ -26,4 +26,4 @@ expression: first_runner_snapshot
|
||||||
│ ││ │
|
│ ││ │
|
||||||
│ ││ │
|
│ ││ │
|
||||||
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 558
|
assertion_line: 562
|
||||||
expression: account_for_races_in_snapshot(last_snapshot)
|
expression: account_for_races_in_snapshot(last_snapshot)
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1 Tab #3 Tab #2
|
Zellij (e2e-test) Tab #1 Tab #3 Tab #2
|
||||||
|
|
@ -26,4 +26,4 @@ expression: account_for_races_in_snapshot(last_snapshot)
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 620
|
assertion_line: 624
|
||||||
expression: account_for_races_in_snapshot(last_snapshot)
|
expression: account_for_races_in_snapshot(last_snapshot)
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #2 Tab #1 Tab #3
|
Zellij (e2e-test) Tab #2 Tab #1 Tab #3
|
||||||
|
|
@ -26,4 +26,4 @@ expression: account_for_races_in_snapshot(last_snapshot)
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 592
|
assertion_line: 596
|
||||||
expression: account_for_races_in_snapshot(last_snapshot)
|
expression: account_for_races_in_snapshot(last_snapshot)
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1 Tab #3 Tab #2
|
Zellij (e2e-test) Tab #1 Tab #3 Tab #2
|
||||||
|
|
@ -26,4 +26,4 @@ expression: account_for_races_in_snapshot(last_snapshot)
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 644
|
assertion_line: 648
|
||||||
expression: account_for_races_in_snapshot(last_snapshot)
|
expression: account_for_races_in_snapshot(last_snapshot)
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #3 Tab #2 Tab #1
|
Zellij (e2e-test) Tab #3 Tab #2 Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: account_for_races_in_snapshot(last_snapshot)
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1809
|
assertion_line: 1836
|
||||||
expression: second_runner_snapshot
|
expression: second_runner_snapshot
|
||||||
---
|
---
|
||||||
Zellij (multiple_users_in_same_pane_and_tab) Tab #1 [ ]
|
Zellij (multiple_users_in_same_pane_and_tab) Tab #1 [ ]
|
||||||
|
|
@ -26,4 +26,4 @@ expression: second_runner_snapshot
|
||||||
│ ││ │
|
│ ││ │
|
||||||
│ ││ │
|
│ ││ │
|
||||||
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1808
|
assertion_line: 1835
|
||||||
expression: first_runner_snapshot
|
expression: first_runner_snapshot
|
||||||
---
|
---
|
||||||
Zellij (multiple_users_in_same_pane_and_tab) Tab #1 [ ]
|
Zellij (multiple_users_in_same_pane_and_tab) Tab #1 [ ]
|
||||||
|
|
@ -26,4 +26,4 @@ expression: first_runner_snapshot
|
||||||
│ ││ │
|
│ ││ │
|
||||||
│ ││ │
|
│ ││ │
|
||||||
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1907
|
assertion_line: 1936
|
||||||
expression: second_runner_snapshot
|
expression: second_runner_snapshot
|
||||||
---
|
---
|
||||||
Zellij (multiple_users_in_different_tabs) Tab #1 [ ] Tab #2
|
Zellij (multiple_users_in_different_tabs) Tab #1 [ ] Tab #2
|
||||||
|
|
@ -26,4 +26,4 @@ expression: second_runner_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1906
|
assertion_line: 1935
|
||||||
expression: first_runner_snapshot
|
expression: first_runner_snapshot
|
||||||
---
|
---
|
||||||
Zellij (multiple_users_in_different_tabs) Tab #1 Tab #2 [ ]
|
Zellij (multiple_users_in_different_tabs) Tab #1 Tab #2 [ ]
|
||||||
|
|
@ -26,4 +26,4 @@ expression: first_runner_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1716
|
assertion_line: 1741
|
||||||
expression: second_runner_snapshot
|
expression: second_runner_snapshot
|
||||||
---
|
---
|
||||||
Zellij (multiple_users_in_same_pane_and_tab) Tab #1 [ ]
|
Zellij (multiple_users_in_same_pane_and_tab) Tab #1 [ ]
|
||||||
|
|
@ -26,4 +26,4 @@ expression: second_runner_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1718
|
assertion_line: 1740
|
||||||
expression: first_runner_snapshot
|
expression: first_runner_snapshot
|
||||||
---
|
---
|
||||||
Zellij (multiple_users_in_same_pane_and_tab) Tab #1 [ ]
|
Zellij (multiple_users_in_same_pane_and_tab) Tab #1 [ ]
|
||||||
|
|
@ -26,4 +26,4 @@ expression: first_runner_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 452
|
assertion_line: 454
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1 Tab #2
|
Zellij (e2e-test) Tab #1 Tab #2
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 2524
|
assertion_line: 2521
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 923
|
assertion_line: 935
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ ││ │
|
│ ││ │
|
||||||
│ ││ │
|
│ ││ │
|
||||||
└────────────────────────────────────────────────────┘└────────────────────────────────────────────────────────────────┘
|
└────────────────────────────────────────────────────┘└────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ ││ │
|
│ ││ │
|
||||||
│ ││ │
|
│ ││ │
|
||||||
└────────────────────────────────────────────────┘└────────────────────────────────────────────────┘
|
└────────────────────────────────────────────────┘└────────────────────────────────────────────────┘
|
||||||
Ctrl + g p t n h s o q Alt + <n> New <←↓↑→> Focus <f> Floating
|
Ctrl + g p t n h s o q ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1428
|
assertion_line: 1451
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ ││line18 │
|
│ ││line18 │
|
||||||
│ ││li█e19 │
|
│ ││li█e19 │
|
||||||
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ ││ │
|
│ ││ │
|
||||||
│ ││ │
|
│ ││ │
|
||||||
└─────────────────────────────────────────────────────────────────────────┘└ [ EXIT CODE: 0 ] <ENTER> re-run, <ESC> drop to shell, <Ctrl-c> exit ────┘
|
└─────────────────────────────────────────────────────────────────────────┘└ [ EXIT CODE: 0 ] <ENTER> re-run, <ESC> drop to shell, <Ctrl-c> exit ────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 194
|
assertion_line: 195
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ ││ │
|
│ ││ │
|
||||||
│ ││ │
|
│ ││ │
|
||||||
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 1476
|
assertion_line: 1500
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ $ │
|
||||||
│
|
│
|
||||||
│
|
│
|
||||||
│
|
│
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 2070
|
assertion_line: 2099
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ ││ │
|
│ ││ │
|
||||||
│ ││ │
|
│ ││ │
|
||||||
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 858
|
assertion_line: 867
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 2240
|
assertion_line: 2263
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: src/tests/e2e/cases.rs
|
source: src/tests/e2e/cases.rs
|
||||||
assertion_line: 2183
|
assertion_line: 2206
|
||||||
expression: last_snapshot
|
expression: last_snapshot
|
||||||
---
|
---
|
||||||
Zellij (e2e-test) Tab #1
|
Zellij (e2e-test) Tab #1
|
||||||
|
|
@ -26,4 +26,4 @@ expression: last_snapshot
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT
|
Ctrl + <g> LOCK <p> PANE <t> TAB <n> RESIZE <h> MOVE <s> SEARCH <o> SESSION <q> QUIT ...
|
||||||
|
|
|
||||||
|
|
@ -1540,6 +1540,8 @@ impl Screen {
|
||||||
let (active_swap_layout_name, is_swap_layout_dirty) = tab.swap_layout_info();
|
let (active_swap_layout_name, is_swap_layout_dirty) = tab.swap_layout_info();
|
||||||
let tab_viewport = tab.get_viewport();
|
let tab_viewport = tab.get_viewport();
|
||||||
let tab_display_area = tab.get_display_area();
|
let tab_display_area = tab.get_display_area();
|
||||||
|
let selectable_tiled_panes_count = tab.get_selectable_tiled_panes_count();
|
||||||
|
let selectable_floating_panes_count = tab.get_selectable_floating_panes_count();
|
||||||
let tab_info_for_screen = TabInfo {
|
let tab_info_for_screen = TabInfo {
|
||||||
position: tab.position,
|
position: tab.position,
|
||||||
name: tab.name.clone(),
|
name: tab.name.clone(),
|
||||||
|
|
@ -1555,6 +1557,8 @@ impl Screen {
|
||||||
viewport_columns: tab_viewport.cols,
|
viewport_columns: tab_viewport.cols,
|
||||||
display_area_rows: tab_display_area.rows,
|
display_area_rows: tab_display_area.rows,
|
||||||
display_area_columns: tab_display_area.cols,
|
display_area_columns: tab_display_area.cols,
|
||||||
|
selectable_tiled_panes_count,
|
||||||
|
selectable_floating_panes_count,
|
||||||
};
|
};
|
||||||
tab_infos_for_screen_state.insert(tab.position, tab_info_for_screen);
|
tab_infos_for_screen_state.insert(tab.position, tab_info_for_screen);
|
||||||
}
|
}
|
||||||
|
|
@ -1576,6 +1580,8 @@ impl Screen {
|
||||||
let (active_swap_layout_name, is_swap_layout_dirty) = tab.swap_layout_info();
|
let (active_swap_layout_name, is_swap_layout_dirty) = tab.swap_layout_info();
|
||||||
let tab_viewport = tab.get_viewport();
|
let tab_viewport = tab.get_viewport();
|
||||||
let tab_display_area = tab.get_display_area();
|
let tab_display_area = tab.get_display_area();
|
||||||
|
let selectable_tiled_panes_count = tab.get_selectable_tiled_panes_count();
|
||||||
|
let selectable_floating_panes_count = tab.get_selectable_floating_panes_count();
|
||||||
let tab_info_for_plugins = TabInfo {
|
let tab_info_for_plugins = TabInfo {
|
||||||
position: tab.position,
|
position: tab.position,
|
||||||
name: tab.name.clone(),
|
name: tab.name.clone(),
|
||||||
|
|
@ -1591,6 +1597,8 @@ impl Screen {
|
||||||
viewport_columns: tab_viewport.cols,
|
viewport_columns: tab_viewport.cols,
|
||||||
display_area_rows: tab_display_area.rows,
|
display_area_rows: tab_display_area.rows,
|
||||||
display_area_columns: tab_display_area.cols,
|
display_area_columns: tab_display_area.cols,
|
||||||
|
selectable_tiled_panes_count,
|
||||||
|
selectable_floating_panes_count,
|
||||||
};
|
};
|
||||||
plugin_tab_updates.push(tab_info_for_plugins);
|
plugin_tab_updates.push(tab_info_for_plugins);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2271,6 +2271,9 @@ impl Tab {
|
||||||
pub fn get_selectable_tiled_panes_count(&self) -> usize {
|
pub fn get_selectable_tiled_panes_count(&self) -> usize {
|
||||||
self.get_selectable_tiled_panes().count()
|
self.get_selectable_tiled_panes().count()
|
||||||
}
|
}
|
||||||
|
pub fn get_selectable_floating_panes_count(&self) -> usize {
|
||||||
|
self.get_selectable_floating_panes().count()
|
||||||
|
}
|
||||||
pub fn get_visible_selectable_floating_panes_count(&self) -> usize {
|
pub fn get_visible_selectable_floating_panes_count(&self) -> usize {
|
||||||
if self.are_floating_panes_visible() {
|
if self.are_floating_panes_visible() {
|
||||||
self.get_selectable_floating_panes().count()
|
self.get_selectable_floating_panes().count()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: zellij-server/src/./unit/screen_tests.rs
|
source: zellij-server/src/./unit/screen_tests.rs
|
||||||
assertion_line: 2926
|
assertion_line: 2929
|
||||||
expression: "format!(\"{:#?}\", plugin_rename_tab_instruction)"
|
expression: "format!(\"{:#?}\", plugin_rename_tab_instruction)"
|
||||||
---
|
---
|
||||||
Some(
|
Some(
|
||||||
|
|
@ -30,6 +30,8 @@ Some(
|
||||||
viewport_columns: 80,
|
viewport_columns: 80,
|
||||||
display_area_rows: 10,
|
display_area_rows: 10,
|
||||||
display_area_columns: 80,
|
display_area_columns: 80,
|
||||||
|
selectable_tiled_panes_count: 2,
|
||||||
|
selectable_floating_panes_count: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: zellij-server/src/./unit/screen_tests.rs
|
source: zellij-server/src/./unit/screen_tests.rs
|
||||||
assertion_line: 2976
|
assertion_line: 2979
|
||||||
expression: "format!(\"{:#?}\", plugin_undo_rename_tab_instruction)"
|
expression: "format!(\"{:#?}\", plugin_undo_rename_tab_instruction)"
|
||||||
---
|
---
|
||||||
Some(
|
Some(
|
||||||
|
|
@ -30,6 +30,8 @@ Some(
|
||||||
viewport_columns: 80,
|
viewport_columns: 80,
|
||||||
display_area_rows: 10,
|
display_area_rows: 10,
|
||||||
display_area_columns: 80,
|
display_area_columns: 80,
|
||||||
|
selectable_tiled_panes_count: 2,
|
||||||
|
selectable_floating_panes_count: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -422,6 +422,10 @@ pub struct TabInfo {
|
||||||
pub display_area_rows: u32,
|
pub display_area_rows: u32,
|
||||||
#[prost(uint32, tag = "14")]
|
#[prost(uint32, tag = "14")]
|
||||||
pub display_area_columns: u32,
|
pub display_area_columns: u32,
|
||||||
|
#[prost(uint32, tag = "15")]
|
||||||
|
pub selectable_tiled_panes_count: u32,
|
||||||
|
#[prost(uint32, tag = "16")]
|
||||||
|
pub selectable_floating_panes_count: u32,
|
||||||
}
|
}
|
||||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
|
|
||||||
|
|
@ -1663,6 +1663,10 @@ pub struct TabInfo {
|
||||||
/// Column count in the display area (including all panes, will typically be larger than the
|
/// Column count in the display area (including all panes, will typically be larger than the
|
||||||
/// viewport)
|
/// viewport)
|
||||||
pub display_area_columns: usize,
|
pub display_area_columns: usize,
|
||||||
|
/// The number of selectable (eg. not the UI bars) tiled panes currently in this tab
|
||||||
|
pub selectable_tiled_panes_count: usize,
|
||||||
|
/// The number of selectable (eg. not the UI bars) floating panes currently in this tab
|
||||||
|
pub selectable_floating_panes_count: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The `PaneManifest` contains a dictionary of panes, indexed by the tab position (0 indexed).
|
/// The `PaneManifest` contains a dictionary of panes, indexed by the tab position (0 indexed).
|
||||||
|
|
|
||||||
|
|
@ -4594,6 +4594,10 @@ impl TabInfo {
|
||||||
let display_area_rows = optional_int_node!("display_area_rows", usize).unwrap_or(0);
|
let display_area_rows = optional_int_node!("display_area_rows", usize).unwrap_or(0);
|
||||||
let display_area_columns = optional_int_node!("display_area_columns", usize).unwrap_or(0);
|
let display_area_columns = optional_int_node!("display_area_columns", usize).unwrap_or(0);
|
||||||
let is_swap_layout_dirty = bool_node!("is_swap_layout_dirty");
|
let is_swap_layout_dirty = bool_node!("is_swap_layout_dirty");
|
||||||
|
let selectable_tiled_panes_count =
|
||||||
|
optional_int_node!("selectable_tiled_panes_count", usize).unwrap_or(0);
|
||||||
|
let selectable_floating_panes_count =
|
||||||
|
optional_int_node!("selectable_floating_panes_count", usize).unwrap_or(0);
|
||||||
Ok(TabInfo {
|
Ok(TabInfo {
|
||||||
position,
|
position,
|
||||||
name,
|
name,
|
||||||
|
|
@ -4609,6 +4613,8 @@ impl TabInfo {
|
||||||
viewport_columns,
|
viewport_columns,
|
||||||
display_area_rows,
|
display_area_rows,
|
||||||
display_area_columns,
|
display_area_columns,
|
||||||
|
selectable_tiled_panes_count,
|
||||||
|
selectable_floating_panes_count,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
pub fn encode_to_kdl(&self) -> KdlDocument {
|
pub fn encode_to_kdl(&self) -> KdlDocument {
|
||||||
|
|
@ -4676,6 +4682,16 @@ impl TabInfo {
|
||||||
is_swap_layout_dirty.push(self.is_swap_layout_dirty);
|
is_swap_layout_dirty.push(self.is_swap_layout_dirty);
|
||||||
kdl_doucment.nodes_mut().push(is_swap_layout_dirty);
|
kdl_doucment.nodes_mut().push(is_swap_layout_dirty);
|
||||||
|
|
||||||
|
let mut selectable_tiled_panes_count = KdlNode::new("selectable_tiled_panes_count");
|
||||||
|
selectable_tiled_panes_count.push(self.selectable_tiled_panes_count as i64);
|
||||||
|
kdl_doucment.nodes_mut().push(selectable_tiled_panes_count);
|
||||||
|
|
||||||
|
let mut selectable_floating_panes_count = KdlNode::new("selectable_floating_panes_count");
|
||||||
|
selectable_floating_panes_count.push(self.selectable_floating_panes_count as i64);
|
||||||
|
kdl_doucment
|
||||||
|
.nodes_mut()
|
||||||
|
.push(selectable_floating_panes_count);
|
||||||
|
|
||||||
kdl_doucment
|
kdl_doucment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5020,6 +5036,8 @@ fn serialize_and_deserialize_session_info_with_data() {
|
||||||
viewport_columns: 10,
|
viewport_columns: 10,
|
||||||
display_area_rows: 10,
|
display_area_rows: 10,
|
||||||
display_area_columns: 10,
|
display_area_columns: 10,
|
||||||
|
selectable_tiled_panes_count: 10,
|
||||||
|
selectable_floating_panes_count: 10,
|
||||||
},
|
},
|
||||||
TabInfo {
|
TabInfo {
|
||||||
position: 1,
|
position: 1,
|
||||||
|
|
@ -5036,6 +5054,8 @@ fn serialize_and_deserialize_session_info_with_data() {
|
||||||
viewport_columns: 10,
|
viewport_columns: 10,
|
||||||
display_area_rows: 10,
|
display_area_rows: 10,
|
||||||
display_area_columns: 10,
|
display_area_columns: 10,
|
||||||
|
selectable_tiled_panes_count: 10,
|
||||||
|
selectable_floating_panes_count: 10,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
panes: PaneManifest { panes },
|
panes: PaneManifest { panes },
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
source: zellij-utils/src/kdl/mod.rs
|
source: zellij-utils/src/kdl/mod.rs
|
||||||
assertion_line: 4728
|
assertion_line: 5070
|
||||||
expression: serialized
|
expression: serialized
|
||||||
---
|
---
|
||||||
name "my session name"
|
name "my session name"
|
||||||
|
|
@ -20,6 +20,8 @@ tabs {
|
||||||
display_area_columns 10
|
display_area_columns 10
|
||||||
display_area_rows 10
|
display_area_rows 10
|
||||||
is_swap_layout_dirty true
|
is_swap_layout_dirty true
|
||||||
|
selectable_tiled_panes_count 10
|
||||||
|
selectable_floating_panes_count 10
|
||||||
}
|
}
|
||||||
tab {
|
tab {
|
||||||
position 1
|
position 1
|
||||||
|
|
@ -35,6 +37,8 @@ tabs {
|
||||||
display_area_columns 10
|
display_area_columns 10
|
||||||
display_area_rows 10
|
display_area_rows 10
|
||||||
is_swap_layout_dirty false
|
is_swap_layout_dirty false
|
||||||
|
selectable_tiled_panes_count 10
|
||||||
|
selectable_floating_panes_count 10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
panes {
|
panes {
|
||||||
|
|
|
||||||
|
|
@ -315,6 +315,8 @@ message TabInfo {
|
||||||
uint32 viewport_columns = 12;
|
uint32 viewport_columns = 12;
|
||||||
uint32 display_area_rows = 13;
|
uint32 display_area_rows = 13;
|
||||||
uint32 display_area_columns = 14;
|
uint32 display_area_columns = 14;
|
||||||
|
uint32 selectable_tiled_panes_count = 15;
|
||||||
|
uint32 selectable_floating_panes_count = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ModeUpdatePayload {
|
message ModeUpdatePayload {
|
||||||
|
|
|
||||||
|
|
@ -1109,6 +1109,9 @@ impl TryFrom<ProtobufTabInfo> for TabInfo {
|
||||||
viewport_columns: protobuf_tab_info.viewport_columns as usize,
|
viewport_columns: protobuf_tab_info.viewport_columns as usize,
|
||||||
display_area_rows: protobuf_tab_info.display_area_rows as usize,
|
display_area_rows: protobuf_tab_info.display_area_rows as usize,
|
||||||
display_area_columns: protobuf_tab_info.display_area_columns as usize,
|
display_area_columns: protobuf_tab_info.display_area_columns as usize,
|
||||||
|
selectable_tiled_panes_count: protobuf_tab_info.selectable_tiled_panes_count as usize,
|
||||||
|
selectable_floating_panes_count: protobuf_tab_info.selectable_floating_panes_count
|
||||||
|
as usize,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1135,6 +1138,8 @@ impl TryFrom<TabInfo> for ProtobufTabInfo {
|
||||||
viewport_columns: tab_info.viewport_columns as u32,
|
viewport_columns: tab_info.viewport_columns as u32,
|
||||||
display_area_rows: tab_info.display_area_rows as u32,
|
display_area_rows: tab_info.display_area_rows as u32,
|
||||||
display_area_columns: tab_info.display_area_columns as u32,
|
display_area_columns: tab_info.display_area_columns as u32,
|
||||||
|
selectable_tiled_panes_count: tab_info.selectable_tiled_panes_count as u32,
|
||||||
|
selectable_floating_panes_count: tab_info.selectable_floating_panes_count as u32,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1540,6 +1545,8 @@ fn serialize_tab_update_event_with_non_default_values() {
|
||||||
viewport_columns: 10,
|
viewport_columns: 10,
|
||||||
display_area_rows: 10,
|
display_area_rows: 10,
|
||||||
display_area_columns: 10,
|
display_area_columns: 10,
|
||||||
|
selectable_tiled_panes_count: 10,
|
||||||
|
selectable_floating_panes_count: 10,
|
||||||
},
|
},
|
||||||
TabInfo {
|
TabInfo {
|
||||||
position: 1,
|
position: 1,
|
||||||
|
|
@ -1556,6 +1563,8 @@ fn serialize_tab_update_event_with_non_default_values() {
|
||||||
viewport_columns: 10,
|
viewport_columns: 10,
|
||||||
display_area_rows: 10,
|
display_area_rows: 10,
|
||||||
display_area_columns: 10,
|
display_area_columns: 10,
|
||||||
|
selectable_tiled_panes_count: 10,
|
||||||
|
selectable_floating_panes_count: 10,
|
||||||
},
|
},
|
||||||
TabInfo::default(),
|
TabInfo::default(),
|
||||||
]);
|
]);
|
||||||
|
|
@ -1827,6 +1836,8 @@ fn serialize_session_update_event_with_non_default_values() {
|
||||||
viewport_columns: 10,
|
viewport_columns: 10,
|
||||||
display_area_rows: 10,
|
display_area_rows: 10,
|
||||||
display_area_columns: 10,
|
display_area_columns: 10,
|
||||||
|
selectable_tiled_panes_count: 10,
|
||||||
|
selectable_floating_panes_count: 10,
|
||||||
},
|
},
|
||||||
TabInfo {
|
TabInfo {
|
||||||
position: 1,
|
position: 1,
|
||||||
|
|
@ -1843,6 +1854,8 @@ fn serialize_session_update_event_with_non_default_values() {
|
||||||
viewport_columns: 10,
|
viewport_columns: 10,
|
||||||
display_area_rows: 10,
|
display_area_rows: 10,
|
||||||
display_area_columns: 10,
|
display_area_columns: 10,
|
||||||
|
selectable_tiled_panes_count: 10,
|
||||||
|
selectable_floating_panes_count: 10,
|
||||||
},
|
},
|
||||||
TabInfo::default(),
|
TabInfo::default(),
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue