feat(tui): W puts the pane layout back
Hiding panes with w and zooming with z had no way back short of pressing each hidden pane's number and Esc. W shows every pane and leaves zoom in one go, and the shortcut bar offers it only while there is a layout to reset.
This commit is contained in:
@@ -1818,6 +1818,26 @@ mod tests {
|
||||
assert!(screen.contains("[C → clear all]"), "{screen}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn shift_w_brings_every_pane_back_and_leaves_zoom() {
|
||||
let mut tui = furnished_tui();
|
||||
tui.state.focused_pane = FocusedPane::Searches;
|
||||
assert!(!screen_sized(&mut tui, 300, 40).contains("[W → "));
|
||||
press(&mut tui, KeyCode::Char('w'));
|
||||
press(&mut tui, KeyCode::Char('z'));
|
||||
assert!(tui.state.layout.zoomed);
|
||||
assert!(!tui.state.layout.is_visible(FocusedPane::Searches));
|
||||
let screen = screen_sized(&mut tui, 300, 40);
|
||||
assert!(screen.contains("[W → reset layout]"), "{screen}");
|
||||
press(&mut tui, KeyCode::Char('W'));
|
||||
assert!(!tui.state.layout.zoomed);
|
||||
assert!(
|
||||
FocusedPane::ALL
|
||||
.iter()
|
||||
.all(|p| tui.state.layout.is_visible(*p))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn page_keys_work_in_the_transfers_and_searches_lists_too() {
|
||||
let mut tui = furnished_tui();
|
||||
|
||||
Reference in New Issue
Block a user