id stringlengths 20 30 | source stringclasses 1
value | chunk_index int64 0 520k | token_count int32 154 512 | content stringlengths 185 57.5k |
|---|---|---|---|---|
rust_dataset_chunk_515600 | rust_dataset.txt | 515,600 | 512 | default());
let snapshot = render_tab(&mut tab, size, client_id);
assert!(!snapshot.contains('╔'), "{}", snapshot);
assert!(snapshot.contains('┌'), "{}", snapshot);
}
#[test]
fn reconfiguring_the_global_border_style_repaints_open_panes() {
let size = Size { cols: 40, rows: 10 };
let client_id = 1;
... |
rust_dataset_chunk_515601 | rust_dataset.txt | 515,601 | 512 | 10 };
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
tab.set_pane_frames(PaneFrameStyle::None);
tab.vertical_split(PaneId::Terminal(2), None, client_id, None, None)
.unwrap();
tab.set_pane_border_style(
PaneId::Terminal(1),
border_style_override(... |
rust_dataset_chunk_515602 | rust_dataset.txt | 515,602 | 512 | assert!(snapshot.contains('│'), "{}", snapshot);
}
#[test]
fn right_click_menu_setting_applies_live_to_the_tab() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
tab.vertical_split(PaneId::Terminal(2), None, ... |
rust_dataset_chunk_515603 | rust_dataset.txt | 515,603 | 512 | rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
open_test_popup(&mut tab, client_id, 1);
tab.close_popup(client_id);
open_test_info_popup(
&mut tab,
client_id,
50,
zellij_utils::data::PopupCorner::TopRight,
4,
... |
rust_dataset_chunk_515604 | rust_dataset.txt | 515,604 | 512 | 0));
}
#[test]
fn a_focused_popup_takes_keys_and_clicks_above_information_popups() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
open_test_popup(&mut tab, client_id, 1);
tab.close_popup(client_id);
ope... |
rust_dataset_chunk_515605 | rust_dataset.txt | 515,605 | 512 | "), "{}", still_hidden);
tab.handle_plugin_bytes(42, client_id, b"held back text".to_vec())
.unwrap();
let shown = render_snapshot_for_client(&mut tab, client_id, size);
assert!(shown.contains("held back text"), "{}", shown);
}
#[test]
fn a_held_back_popup_is_shown_when_revealed_without_drawing() {... |
rust_dataset_chunk_515606 | rust_dataset.txt | 515,606 | 512 | Id, size: Size) -> String {
let mut output = Output::default();
tab.render(&mut output, None).unwrap();
let serialized = output.serialize().unwrap();
take_snapshot(
serialized.get(&client_id).unwrap().ansi(),
size.rows,
size.cols,
Palette::default(),
)
}
#[test]
fn a... |
rust_dataset_chunk_515607 | rust_dataset.txt | 515,607 | 512 | from("INFO-TEXT".as_bytes()))
.unwrap();
let snapshot = render_snapshot_for_client(&mut tab, client_id, size);
assert!(snapshot.contains("PROMPT-TEXT"), "{}", snapshot);
assert!(snapshot.contains("INFO-TEXT"), "{}", snapshot);
}
fn keys_sent_to_plugin(
plugin_receiver: &Receiver<(PluginInstruct... |
rust_dataset_chunk_515608 | rust_dataset.txt | 515,608 | 512 | "{}", snapshot);
assert!(snapshot.contains("Allow?"), "{}", snapshot);
keys_sent_to_plugin(&plugin_receiver, 42);
let key =
|c: char| zellij_utils::data::KeyWithModifier::new(zellij_utils::data::BareKey::Char(c));
assert!(tab.send_key_to_popup(client_id, key('x'), vec![b'x'], false));
let ... |
rust_dataset_chunk_515609 | rust_dataset.txt | 515,609 | 512 | assert_eq!(tab.popup_plugin_id(client_id), Some(50));
keys_sent_to_plugin(&plugin_receiver, 50);
let key =
|c: char| zellij_utils::data::KeyWithModifier::new(zellij_utils::data::BareKey::Char(c));
assert!(tab.send_key_to_popup(client_id, key('y'), vec![b'y'], false));
let (_, results) = keys_se... |
rust_dataset_chunk_515610 | rust_dataset.txt | 515,610 | 512 | 8,
None,
String::from("prompt"),
)
.unwrap();
ask_popup_for_read_permission(&mut tab, 42);
let outside = MouseEvent::new_left_press_event(Position::new(15, 100));
assert_eq!(
tab.handle_popup_mouse_event(&outside, client_id),
Some(crate::tab::PopupMouseOutcome::Consu... |
rust_dataset_chunk_515611 | rust_dataset.txt | 515,611 | 512 | _event(&MouseEvent::new_left_release_event(plugin_point), client_id)
.unwrap();
assert!(tab.selecting_with_mouse_in_pane.is_none());
let terminal_point = center_of_pane(&tab, PaneId::Terminal(1));
tab.handle_mouse_event(&MouseEvent::new_left_press_event(terminal_point), client_id)
.unwrap()... |
rust_dataset_chunk_515612 | rust_dataset.txt | 515,612 | 512 | MouseEvent::new_left_release_event(position);
shift_release.shift = true;
tab.handle_mouse_event(&shift_press, client_id).unwrap();
assert_eq!(tab.selecting_with_mouse_in_pane, Some(PaneId::Terminal(1)));
tab.handle_mouse_event(&shift_release, client_id).unwrap();
assert!(
tab.selecting_wit... |
rust_dataset_chunk_515613 | rust_dataset.txt | 515,613 | 512 | swap_layout.swap_floating_layouts.clone(),
),
Some((
base_layout,
base_floating_layout,
vec![(1, None)],
vec![],
new_plugin_ids,
)),
true,
true,
);
tab.set_pane_collapsed(PaneId::Plugin(1), true);
... |
rust_dataset_chunk_515614 | rust_dataset.txt | 515,614 | 512 | 5, 60);
for _ in 0..2 {
tab.handle_mouse_event(&MouseEvent::new_left_press_event(frame_position), client_id)
.unwrap();
tab.handle_mouse_event(
&MouseEvent::new_left_release_event(frame_position),
client_id,
)
.unwrap();
}
assert!(tab.is_fu... |
rust_dataset_chunk_515615 | rust_dataset.txt | 515,615 | 512 | 121,
rows: 20,
};
let client_id = 1;
let mut tab = tab_with_two_tiled_panes(size, client_id);
let mousebinds = mousebinds_from(
"mousebinds {\n shared {\n bind \"Ctrl Left\" on=\"content\" { ToggleFullscreen; }\n }\n}\n",
);
click_with(
&mut tab,
Mou... |
rust_dataset_chunk_515616 | rust_dataset.txt | 515,616 | 512 | ::new_middle_press_event(position),
client_id,
&mousebinds,
);
assert_eq!(
press.run_actions,
Some(vec![zellij_utils::input::actions::Action::GoToNextTab])
);
let motion = click_with(
&mut tab,
MouseEvent::new_middle_motion_event(position),
client_... |
rust_dataset_chunk_515617 | rust_dataset.txt | 515,617 | 512 | cols: 121,
rows: 20,
};
let client_id = 1;
let mut pty_instruction_bus = MockPtyInstructionBus::new();
let mut tab = create_new_tab_with_mock_pty_writer(
size,
ModeInfo::default(),
pty_instruction_bus.pty_write_sender(),
);
pty_instruction_bus.start();
... |
rust_dataset_chunk_515618 | rust_dataset.txt | 515,618 | 512 | MouseEvent::new_left_release_with_ctrl_event(Position::new(6, 12)),
client_id,
&mousebinds,
);
pty_instruction_bus.exit();
assert_eq!(pty_instruction_bus.clone_output().len(), 3);
}
#[test]
fn a_program_with_mouse_reporting_gets_both_raw_clicks_of_a_double_click() {
let size = Size {
... |
rust_dataset_chunk_515619 | rust_dataset.txt | 515,619 | 512 | _event(&MouseEvent::new_left_release_event(position), client_id)
.unwrap();
};
let selected = |tab: &Tab| {
tab.get_active_pane(client_id)
.unwrap()
.get_selected_text(client_id)
};
click(&mut tab);
click(&mut tab);
assert_eq!(selected(&tab), Some("sec... |
rust_dataset_chunk_515620 | rust_dataset.txt | 515,620 | 512 | ((geom_before.y + 2) as i32, (geom_before.x + 3) as u16);
let moved_to = Position::new((geom_before.y + 4) as i32, (geom_before.x + 8) as u16);
let mousebinds = mousebinds_from(
"mousebinds {\n shared {\n bind \"Alt Left\" { MovePane; }\n }\n}\n",
);
click_with(
&mut tab,
... |
rust_dataset_chunk_515621 | rust_dataset.txt | 515,621 | 512 | ::default(),
Some(client_id),
None,
)
.unwrap();
tab.set_pane_selectable(PaneId::Plugin(7), false);
while plugin_receiver.try_recv().is_ok() {}
(tab, plugin_receiver)
}
#[test]
fn dragging_in_an_unselectable_plugin_pane_sends_hold_and_release_to_the_plugin() {
use zellij_utils::... |
rust_dataset_chunk_515622 | rust_dataset.txt | 515,622 | 512 | ),
_ => None,
});
assert_eq!(hold_column, click_column.map(|column| column + 3));
}
#[test]
fn a_middle_click_on_an_unselectable_plugin_pane_does_not_start_a_drag() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let (mut tab, _plugin_receiver) = tab_with_... |
rust_dataset_chunk_515623 | rust_dataset.txt | 515,623 | 512 | leaving_client_id]));
assert_eq!(drained.len(), 1);
assert!(!tab.mouse_gesture_is_held());
while plugin_receiver.try_recv().is_ok() {}
tab.handle_mouse_event(
&MouseEvent::new_left_press_event(plugin_point),
staying_client_id,
)
.unwrap();
let events = mouse_events_sent_to_p... |
rust_dataset_chunk_515624 | rust_dataset.txt | 515,624 | 512 | _with_plugin_receiver(size, ModeInfo::default());
let coordinates = FloatingPaneCoordinates {
x: Some(PercentOrFixed::Fixed(30)),
y: Some(PercentOrFixed::Fixed(5)),
width: Some(PercentOrFixed::Fixed(40)),
height: Some(PercentOrFixed::Fixed(8)),
pinned: Some(true),
bor... |
rust_dataset_chunk_515625 | rust_dataset.txt | 515,625 | 512 | ::Hover(..))),
"{:?}",
events
);
tab.handle_mouse_event(&MouseEvent::new_left_press_event(plugin_point), client_id)
.unwrap();
tab.handle_mouse_event(&MouseEvent::new_left_release_event(plugin_point), client_id)
.unwrap();
let events = mouse_events_sent_to_plugin(&plugin_... |
rust_dataset_chunk_515626 | rust_dataset.txt | 515,626 | 512 | ));
tab.plugin_hover_pane_id
.insert(client_id, PaneId::Plugin(99));
assert!(tab.clear_hover_under_popups(client_id));
assert!(tab.mouse_hover_pane_id.get(&client_id).is_none());
assert!(tab.plugin_hover_pane_id.get(&client_id).is_none());
assert!(!tab.clear_hover_under_popups(client_id));
}... |
rust_dataset_chunk_515627 | rust_dataset.txt | 515,627 | 512 | _found_by_its_location_and_focus() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
let (plugin_sender, _plugin_receiver) = channels::unbounded();
tab.senders
.replace_to_plugin(SenderWithContext::new(... |
rust_dataset_chunk_515628 | rust_dataset.txt | 515,628 | 512 | assert!(for_client.contains("\u{1b}["));
assert_eq!(for_client, for_anyone);
assert!(popup
.pane
.dump_screen_with_ansi(false, Some(9))
.contains("plugin text"));
}
#[test]
fn popups_are_described_to_the_client_above_its_panes() {
let size = Size {
cols: 121,
row... |
rust_dataset_chunk_515629 | rust_dataset.txt | 515,629 | 512 | !(
popups.last().unwrap().focused(),
"a prompt takes focus and is drawn last"
);
let geometry = zellij_utils::structured_render::GeometryRecord { panes: rects };
assert!(
geometry.claims_the_click(0, 19),
"while a prompt is open every click belongs to it"
);
assert_eq... |
rust_dataset_chunk_515630 | rust_dataset.txt | 515,630 | 512 | (size, ModeInfo::default());
let (plugin_sender, _plugin_receiver) = channels::unbounded();
tab.senders
.replace_to_plugin(SenderWithContext::new(plugin_sender));
open_test_prompt_popup(&mut tab, client_id, 42, 3);
let mut output = Output::default();
tab.render(&mut output, None).unwrap();
... |
rust_dataset_chunk_515631 | rust_dataset.txt | 515,631 | 512 | None).unwrap();
let snapshot = take_snapshot(
output.serialize().unwrap().get(&client_id).unwrap().ansi(),
size.rows,
size.cols,
Palette::default(),
);
let row = snapshot.lines().nth(line).unwrap();
let (_, cells) = row.split_once("): ").unwrap();
cells.chars().nth(c... |
rust_dataset_chunk_515632 | rust_dataset.txt | 515,632 | 512 | 20,
};
let client_id = 1;
let mut tab = tab_with_two_tiled_panes(size, client_id);
tab.handle_mouse_event(
&MouseEvent::new_left_press_with_ctrl_event(Position::new(10, 90)),
client_id,
)
.unwrap();
let release = tab
.handle_mouse_event(
&MouseEvent::new_... |
rust_dataset_chunk_515633 | rust_dataset.txt | 515,633 | 512 | new();
configuration.insert("key".to_owned(), "value".to_owned());
let plugin =
RunPluginOrAlias::from_url("filepicker", &Some(configuration), None, None).unwrap();
assert_eq!(
release.run_actions,
Some(vec![
zellij_utils::input::actions::Action::NewFloatingPluginPane {
... |
rust_dataset_chunk_515634 | rust_dataset.txt | 515,634 | 512 | size.rows,
size.cols,
Palette::default(),
);
assert!(!watcher_snapshot.lines().nth(3).unwrap().contains('┌'));
tab.handle_mouse_event(
&MouseEvent::new_left_release_with_ctrl_event(Position::new(10, 90)),
client_id,
)
.unwrap();
assert_ne!(rendered_cell(&mut tab... |
rust_dataset_chunk_515635 | rust_dataset.txt | 515,635 | 512 | 100)
.with_y_fixed(12)
.with_width_fixed(15)
.with_height_fixed(6),
)),
Some(client_id),
None,
)
.unwrap();
assert!(tab.are_floating_panes_visible());
tab.handle_mouse_event(
&MouseEvent::new_left_press_with_ctrl_event(Posit... |
rust_dataset_chunk_515636 | rust_dataset.txt | 515,636 | 512 | _plugin_or_alias)) = run {
new_plugin_ids.insert(run_plugin_or_alias, vec![next_plugin_id]);
next_plugin_id += 1;
}
}
let mut swap_layout =
Layout::from_kdl(swap_layouts, Some("file_name.kdl".into()), None, None).unwrap();
swap_layout.populate_plugin_aliases_in_swap_l... |
rust_dataset_chunk_515637 | rust_dataset.txt | 515,637 | 512 | , status_bar);
}
#[test]
fn closing_a_pane_keeps_resurrected_bars_in_their_swap_layout_slots() {
let plugin_aliases = zellij_utils::input::config::Config::from_default_assets()
.unwrap()
.plugins;
let (tab_bar, status_bar) = bars_geometry_after_closing_a_pane(
r#"
layout {
... |
rust_dataset_chunk_515638 | rust_dataset.txt | 515,638 | 512 | ::default());
tab.vertical_split(PaneId::Terminal(2), None, client_id, None, None)
.unwrap();
tab.horizontal_split(PaneId::Terminal(3), None, client_id, None, None)
.unwrap();
let left = tab
.get_pane_with_id(PaneId::Terminal(1))
.unwrap()
.position_and_size();
le... |
rust_dataset_chunk_515639 | rust_dataset.txt | 515,639 | 512 | drag_from(
&mut tab,
Position::new(junction_line, junction_column),
Position::new(junction_line + 2, junction_column + 3),
);
assert_both_dividers_moved(&tab, left, right_top);
}
#[test]
fn dragging_next_to_the_junction_of_two_dividers_moves_both() {
let (mut tab, left, right_top) ... |
rust_dataset_chunk_515640 | rust_dataset.txt | 515,640 | 512 | ::ServerInstruction;
use crate::{os_input_output::ServerOsApi, panes::PaneId, thread_bus::ThreadSenders, ClientId};
use std::net::{IpAddr, Ipv4Addr};
use std::path::PathBuf;
use tokio::sync::oneshot;
use zellij_utils::channels::{unbounded, ChannelWithContext, Receiver, SenderWithContext};
use zellij_utils::data::{Direc... |
rust_dataset_chunk_515641 | rust_dataset.txt | 515,641 | 512 | <()> {
unimplemented!()
}
fn kill(&self, _pid: u32) -> Result<()> {
unimplemented!()
}
fn force_kill(&self, _pid: u32) -> Result<()> {
unimplemented!()
}
fn box_clone(&self) -> Box<dyn ServerOsApi> {
Box::new((*self).clone())
}
fn send_to_client(&self, _cl... |
rust_dataset_chunk_515642 | rust_dataset.txt | 515,642 | 512 | Increase, Some(Direction::Left)),
)
.unwrap();
}
fn tab_resize_down(tab: &mut Tab, id: ClientId) {
tab.resize(
id,
ResizeStrategy::new(Resize::Increase, Some(Direction::Down)),
)
.unwrap();
}
fn tab_resize_up(tab: &mut Tab, id: ClientId) {
tab.resize(
id,
Resize... |
rust_dataset_chunk_515643 | rust_dataset.txt | 515,643 | 512 | Rc::new(RefCell::new(PaneGroups::new(ThreadSenders::default())));
let currently_marking_pane_group = Rc::new(RefCell::new(HashMap::new()));
let debug = false;
let arrow_fonts = true;
let styled_underlines = true;
let osc8_hyperlinks = true;
let explicitly_disable_kitty_keyboard_protocol = false... |
rust_dataset_chunk_515644 | rust_dataset.txt | 515,644 | 512 | String::new();
let os_api = Box::new(FakeInputOutput {});
let senders = ThreadSenders::default().silently_fail_on_send();
let max_panes = None;
let mode_info = ModeInfo::default();
let style = Style::default();
let draw_pane_frames = PaneFrameStyle::Full;
let auto_layout = true;
let cli... |
rust_dataset_chunk_515645 | rust_dataset.txt | 515,645 | 512 | session_is_mirrored,
Some(client_id),
copy_options,
terminal_emulator_colors,
terminal_emulator_color_codes,
(vec![], vec![]), // swap layouts
PathBuf::from("my_default_shell"),
debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
... |
rust_dataset_chunk_515646 | rust_dataset.txt | 515,646 | 512 | ane_group = Rc::new(RefCell::new(PaneGroups::new(ThreadSenders::default())));
let currently_marking_pane_group = Rc::new(RefCell::new(HashMap::new()));
let debug = false;
let arrow_fonts = true;
let styled_underlines = true;
let osc8_hyperlinks = true;
let explicitly_disable_kitty_keyboard_proto... |
rust_dataset_chunk_515647 | rust_dataset.txt | 515,647 | 512 | let mut tab = create_new_tab(size, stacked_resize);
tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
// Suppress pane 2 and remove it from active panes
tab.replace_active_pane_with_editor_pane(PaneId::Terminal(2), 1)
.unwrap();
tab.tiled_panes.remove_pane(Pane... |
rust_dataset_chunk_515648 | rust_dataset.txt | 515,648 | 512 | ,
"first pane row count"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(2))
.unwrap()
.position_and_size()
.x,
61,
"second pane x position"
);
assert_eq!(
tab.tiled_panes
.panes
... |
rust_dataset_chunk_515649 | rust_dataset.txt | 515,649 | 512 | pane column count"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(1))
.unwrap()
.position_and_size()
.rows
.as_usize(),
10,
"first pane row count"
);
assert_eq!(
tab.tiled_panes
... |
rust_dataset_chunk_515650 | rust_dataset.txt | 515,650 | 512 |
.panes
.get(&PaneId::Terminal(1))
.unwrap()
.position_and_size()
.y,
0,
"first pane y position"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(1))
.unwrap()
.positio... |
rust_dataset_chunk_515651 | rust_dataset.txt | 515,651 | 512 | .panes
.get(&PaneId::Terminal(3))
.unwrap()
.position_and_size()
.cols
.as_usize(),
61,
"third pane column count"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(3))
.unwrap()
... |
rust_dataset_chunk_515652 | rust_dataset.txt | 515,652 | 512 | .horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
assert_eq!(
tab.tiled_panes.panes.len(),
1,
"Tab still has only one pane"
);
}
#[test]
pub fn removing_a_client_not_connected_to_the_tab_does_not_force_render() {
let size = Size {
cols: 121,
... |
rust_dataset_chunk_515653 | rust_dataset.txt | 515,653 | 512 | 20,
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
tab.remove_client(1);
tab.new_pane(
PaneId::Terminal(2),
None,
None,
false,
true,
NewPanePlacement::Tiled {
direction: Some(Direction::Down),
... |
rust_dataset_chunk_515654 | rust_dataset.txt | 515,654 | 512 | ,
true,
NewPanePlacement::default(),
Some(1),
None,
)
.unwrap();
assert_eq!(
tab.tiled_panes.panes.len(),
1,
"Tab still has only one pane"
);
}
#[test]
pub fn cannot_split_panes_vertically_when_active_pane_has_fixed_columns() {
let size = Size... |
rust_dataset_chunk_515655 | rust_dataset.txt | 515,655 | 512 | TiledPaneLayout::default()];
let mut initial_layout = TiledPaneLayout::default();
initial_layout.children_split_direction = SplitDirection::Horizontal;
initial_layout.children = vec![top_row, TiledPaneLayout::default()];
let mut tab = create_new_tab_with_layout(size, initial_layout);
tab.focus_pane... |
rust_dataset_chunk_515656 | rust_dataset.txt | 515,656 | 512 | a stack"
);
tab.close_pane(PaneId::Terminal(1), false, None);
assert!(
tab.tiled_panes.panes.contains_key(&PaneId::Terminal(0)),
"small fixed pane remains"
);
assert!(
!tab.tiled_panes.panes.contains_key(&PaneId::Terminal(1)),
"neighbouring pane was closed"
);
}
... |
rust_dataset_chunk_515657 | rust_dataset.txt | 515,657 | 512 | .move_pane(search_backwards, PaneId::Terminal(1));
tab.tiled_panes
.move_pane(!search_backwards, PaneId::Terminal(1));
assert_eq!(tab.tiled_panes.panes.len(), 2, "both panes remain");
}
#[test]
pub fn closing_pane_next_to_stack_without_flexible_pane_removes_it() {
let mut tab = create_tab_w... |
rust_dataset_chunk_515658 | rust_dataset.txt | 515,658 | 512 | 0,
"Pane y is on screen edge"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(4))
.unwrap()
.cols(),
121,
"Pane cols match fullscreen cols"
);
assert_eq!(
tab.tiled_panes
.panes
... |
rust_dataset_chunk_515659 | rust_dataset.txt | 515,659 | 512 | (),
0,
"Pane x is on screen edge"
);
assert_eq!(
tab.tiled_panes.panes.get(&PaneId::Terminal(4)).unwrap().y(),
0,
"Pane y is on screen edge"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(4))
.unwrap()
... |
rust_dataset_chunk_515660 | rust_dataset.txt | 515,660 | 512 | ::Terminal(i);
tab.new_pane(
new_pane_id,
None,
None,
false,
true,
NewPanePlacement::default(),
Some(1),
None,
)
.unwrap();
}
tab.toggle_active_pane_fullscreen(1);
assert!(
tab.is_... |
rust_dataset_chunk_515661 | rust_dataset.txt | 515,661 | 512 | Some(1),
None,
)
.unwrap();
}
let active_pane_id = tab
.get_active_pane_id(1)
.expect("an active pane exists before fullscreen");
tab.toggle_active_pane_fullscreen(1);
assert!(tab.is_fullscreen_active(), "Fullscreen is active");
tab.resize_wh... |
rust_dataset_chunk_515662 | rust_dataset.txt | 515,662 | 512 | .toggle_active_pane_no_ui_fullscreen(1);
assert!(tab.is_fullscreen_active(), "NoUi fullscreen is active");
assert!(
tab.fullscreen_covers_ui(),
"NoUi fullscreen covers the UI rows"
);
let active_pane = tab.tiled_panes.panes.get(&PaneId::Terminal(4)).unwrap();
assert_eq!(active_pane.x... |
rust_dataset_chunk_515663 | rust_dataset.txt | 515,663 | 512 | tab.fullscreen_covers_ui(),
"Fullscreen switched to covering the UI rows"
);
tab.toggle_active_pane_no_ui_fullscreen(1);
assert!(
!tab.is_fullscreen_active(),
"Fullscreen toggled off entirely"
);
}
#[test]
pub fn no_ui_fullscreen_downgrades_to_regular_fullscreen() {
... |
rust_dataset_chunk_515664 | rust_dataset.txt | 515,664 | 512 | ;
let mut tab = create_new_tab(initial_size, stacked_resize);
for i in 2..5 {
let new_pane_id = PaneId::Terminal(i);
tab.new_pane(
new_pane_id,
None,
None,
false,
true,
NewPanePlacement::default(),
Some(1),
... |
rust_dataset_chunk_515665 | rust_dataset.txt | 515,665 | 512 | expect("floating pane exists")
.current_geom()
}
#[test]
pub fn toggle_floating_pane_fullscreen_expands_over_viewport() {
let mut tab = create_tab_with_two_floating_panes();
let viewport = *tab.viewport.borrow();
let active_pane_id = tab
.floating_panes
.active_pane_id(1)
.e... |
rust_dataset_chunk_515666 | rust_dataset.txt | 515,666 | 512 | "No-ui fullscreen pane rows match display rows"
);
}
#[test]
pub fn toggle_floating_pane_fullscreen_off_restores_geometry() {
let mut tab = create_tab_with_two_floating_panes();
let active_pane_id = tab
.floating_panes
.active_pane_id(1)
.expect("a floating pane is focused")... |
rust_dataset_chunk_515667 | rust_dataset.txt | 515,667 | 512 | (),
"The downgrade restores the UI rows"
);
let geom = floating_pane_geom(&tab, active_pane_id);
assert_eq!(geom.x, viewport.x, "Pane x matches the viewport");
assert_eq!(geom.y, viewport.y, "Pane y matches the viewport");
assert_eq!(
geom.cols.as_usize(),
viewport.cols,
... |
rust_dataset_chunk_515668 | rust_dataset.txt | 515,668 | 512 | ane_id(),
Some(PaneId::Terminal(3)),
"The focused floating pane is fullscreen"
);
assert!(
!tab.tiled_panes.fullscreen_is_active(),
"No tiled fullscreen while a floating pane is fullscreen"
);
tab.hide_floating_panes();
tab.toggle_active_pane_fullscreen(1);
asser... |
rust_dataset_chunk_515669 | rust_dataset.txt | 515,669 | 512 | anes();
let active_pane_id = tab
.floating_panes
.active_pane_id(1)
.expect("a floating pane is focused");
tab.toggle_active_pane_fullscreen(1);
let geom_before = floating_pane_geom(&tab, active_pane_id);
tab.move_active_pane_down(1);
tab.move_active_pane_up(1);
tab.move... |
rust_dataset_chunk_515670 | rust_dataset.txt | 515,670 | 512 | tab = create_tab_with_two_floating_panes();
let active_pane_id = tab
.floating_panes
.active_pane_id(1)
.expect("a floating pane is focused");
tab.toggle_active_pane_fullscreen(1);
assert!(tab.is_fullscreen_active(), "Fullscreen active before embed");
tab.toggle_pane_embed_or_f... |
rust_dataset_chunk_515671 | rust_dataset.txt | 515,671 | 512 | , active_pane_id);
assert_eq!(
geom.cols.as_usize(),
new_size.cols,
"Floating no-ui fullscreen pane re-expands to the new display cols"
);
assert_eq!(
geom.rows.as_usize(),
new_size.rows,
"Floating no-ui fullscreen pane re-expands to the new display rows"
... |
rust_dataset_chunk_515672 | rust_dataset.txt | 515,672 | 512 | PaneId::Terminal(i);
tab.new_pane(
new_pane_id,
None,
None,
false,
true,
NewPanePlacement::default(),
Some(1),
None,
)
.unwrap();
}
tab
}
fn tiled_pane_geoms(tab: &Tab) -> Vec<(PaneId, PaneG... |
rust_dataset_chunk_515673 | rust_dataset.txt | 515,673 | 512 | _fullscreen() {
let mut tab = create_tab_with_four_panes();
tab.toggle_active_pane_fullscreen(1);
assert!(tab.is_fullscreen_active(), "Fullscreen active before split");
open_pane_five(&mut tab);
assert!(
!tab.is_fullscreen_active(),
"Opening a new pane breaks out of fullscreen"
... |
rust_dataset_chunk_515674 | rust_dataset.txt | 515,674 | 512 | _the_no_ui_fullscreen_pane_restores_remaining_layout() {
let mut tab_without_fullscreen = create_tab_with_four_panes();
tab_without_fullscreen.close_pane(PaneId::Terminal(4), false, None);
let mut tab = create_tab_with_four_panes();
tab.toggle_active_pane_no_ui_fullscreen(1);
assert!(
tab.f... |
rust_dataset_chunk_515675 | rust_dataset.txt | 515,675 | 512 | _active_pane_id(client_id),
Some(editor_pane_id),
"editor pane is now active",
);
tab.toggle_active_pane_fullscreen(client_id);
assert!(
tab.is_fullscreen_active(),
"fullscreen is active on the editor pane",
);
assert_eq!(
tab.tiled_panes.fullscreen_pane_id()... |
rust_dataset_chunk_515676 | rust_dataset.txt | 515,676 | 512 | // scrollback editor on it. The editor takes the fullscreen pane's slot
// and inherits its 100% geom_override, so the fullscreen bookkeeping
// must follow the swap onto the editor's pane id. Otherwise toggling
// fullscreen off later cannot reset the override on the editor.
let size = Size {
... |
rust_dataset_chunk_515677 | rust_dataset.txt | 515,677 | 512 |
&& geom.y + geom.rows.as_usize() <= size.rows,
"pane fits inside the display area: \
x={}, y={}, cols={}, rows={}, display={}x{}",
geom.x,
geom.y,
geom.cols.as_usize(),
geom.rows.as_usize(),
size.cols,
size... |
rust_dataset_chunk_515678 | rust_dataset.txt | 515,678 | 512 | editor pane falls back to the replaced pane's original geometry",
);
}
#[test]
pub fn closing_fullscreen_floating_scrollback_editor_restores_geometry() {
let client_id = 1;
let mut tab = create_tab_with_two_floating_panes();
let active_pane_id = tab
.floating_panes
.active_pane_id(clien... |
rust_dataset_chunk_515679 | rust_dataset.txt | 515,679 | 512 | None,
false,
true,
NewPanePlacement::default(),
Some(1),
None,
)
.unwrap();
active_tab
.new_pane(
PaneId::Terminal(3),
None,
None,
false,
true,
NewPanePlacemen... |
rust_dataset_chunk_515680 | rust_dataset.txt | 515,680 | 512 | ,
NewPanePlacement::default(),
Some(1),
None,
)
.unwrap();
active_tab.toggle_active_pane_fullscreen(1);
// order is now 1 2 3 4
active_tab.switch_prev_pane_fullscreen(1);
active_tab.switch_prev_pane_fullscreen(1);
active_tab.switch_prev_pane_fulls... |
rust_dataset_chunk_515681 | rust_dataset.txt | 515,681 | 512 | );
active_tab.switch_last_pane_fullscreen(1);
// the position should now be back in Terminal 4
assert_eq!(
active_tab.get_active_pane_id(1).unwrap(),
PaneId::Terminal(4),
"Active pane did not switch to the last pane in fullscreen mode"
);
}
#[test]
pub fn close_pane_with_... |
rust_dataset_chunk_515682 | rust_dataset.txt | 515,682 | 512 | .position_and_size()
.rows
.as_usize(),
20,
"remaining pane row count"
);
}
#[test]
pub fn close_pane_with_another_pane_below_it() {
// ┌───────────┐ ┌───────────┐
// │███████████│ │xxxxxxxxxxx│
// │███████████│ │xxxxxxxxxxx│
... |
rust_dataset_chunk_515683 | rust_dataset.txt | 515,683 | 512 | ]
pub fn close_pane_with_another_pane_to_the_left() {
// ┌─────┬─────┐ ┌──────────┐
// │xxxxx│█████│ │xxxxxxxxxx│
// │xxxxx│█████│ ==close==> │xxxxxxxxxx│
// │xxxxx│█████│ │xxxxxxxxxx│
// └─────┴─────┘ └──────────┘
// █ == pane being closed
let siz... |
rust_dataset_chunk_515684 | rust_dataset.txt | 515,684 | 512 | xxxxx│ ==close==> │xxxxxxxxxx│
// │█████│xxxxx│ │xxxxxxxxxx│
// └─────┴─────┘ └──────────┘
// █ == pane being closed
let size = Size {
cols: 121,
rows: 20,
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
let new_pane... |
rust_dataset_chunk_515685 | rust_dataset.txt | 515,685 | 512 | │xxxxx│xxxxx│
// │███████████│ │xxxxx│xxxxx│
// └───────────┘ └─────┴─────┘
// █ == pane being closed
let size = Size {
cols: 121,
rows: 20,
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id... |
rust_dataset_chunk_515686 | rust_dataset.txt | 515,686 | 512 | second remaining pane x position"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(3))
.unwrap()
.position_and_size()
.y,
0,
"second remaining pane y position"
);
assert_eq!(
tab.tiled_panes
... |
rust_dataset_chunk_515687 | rust_dataset.txt | 515,687 | 512 | in tab");
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(2))
.unwrap()
.position_and_size()
.x,
0,
"first remaining pane x position"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&Pa... |
rust_dataset_chunk_515688 | rust_dataset.txt | 515,688 | 512 | █│ │xxxxxxxxxx│
// │xxxxx│█████│ │xxxxxxxxxx│
// ├─────┤█████│ ==close==> ├──────────┤
// │xxxxx│█████│ │xxxxxxxxxx│
// │xxxxx│█████│ │xxxxxxxxxx│
// └─────┴─────┘ └──────────┘
// █ == pane being closed
let size = Size {
cols: 12... |
rust_dataset_chunk_515689 | rust_dataset.txt | 515,689 | 512 | _eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(3))
.unwrap()
.position_and_size()
.x,
0,
"second remaining pane x position"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(3))
... |
rust_dataset_chunk_515690 | rust_dataset.txt | 515,690 | 512 | ane(1, None).unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 2, "Two panes left in tab");
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(2))
.unwrap()
.position_and_size()
.x,
0,
"first remaining pane x position"
... |
rust_dataset_chunk_515691 | rust_dataset.txt | 515,691 | 512 | away_from_screen_edges() {
// ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐
// │xxx│xxx│xxx│xxx│ │xxx│xxx│xxx│xxx│
// ├───┤xxx│xxx├───┤ ├───┤xxx│xxx├───┤
// │xxx├───┴───┤xxx│ ==close==> │xxx│xxx│xxx│xxx│
// │xxx│███████│xxx│ │xxx│xxx│xxx│xxx│
// │xxx│███████│xxx... |
rust_dataset_chunk_515692 | rust_dataset.txt | 515,692 | 512 | tab.move_focus_left(1).unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_down(&mut tab, 1);
tab.vertical_split(new_pane_id_6, None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 6, "Six ... |
rust_dataset_chunk_515693 | rust_dataset.txt | 515,693 | 512 | .tiled_panes
.panes
.get(&PaneId::Terminal(2))
.unwrap()
.position_and_size()
.rows
.as_usize(),
20,
"second remaining pane row count"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Term... |
rust_dataset_chunk_515694 | rust_dataset.txt | 515,694 | 512 | "fourth remaining pane row count"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(6))
.unwrap()
.position_and_size()
.x,
91,
"sixths remaining pane x position"
);
assert_eq!(
tab.tiled_panes... |
rust_dataset_chunk_515695 | rust_dataset.txt | 515,695 | 512 | �───────┬───┐ ┌───┬───┬───┬───┐
// │xxx│███████│xxx│ │xxx│xxx│xxx│xxx│
// │xxx│███████│xxx│ │xxx│xxx│xxx│xxx│
// │xxx├───┬───┤xxx│ ==close==> │xxx│xxx│xxx│xxx│
// ├───┤xxx│xxx├───┤ ├───┤xxx│xxx├───┤
// │xxx│xxx│xxx│xxx│ │xxx│xxx│xxx│xxx│
// ... |
rust_dataset_chunk_515696 | rust_dataset.txt | 515,696 | 512 | _up(&mut tab, 1);
tab.vertical_split(new_pane_id_6, None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 6, "Six panes left in tab");
assert_eq!(
tab.tiled_panes
.panes
... |
rust_dataset_chunk_515697 | rust_dataset.txt | 515,697 | 512 | unwrap()
.position_and_size()
.rows
.as_usize(),
10,
"third remaining pane row count"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(4))
.unwrap()
.position_and_size()
.x,
... |
rust_dataset_chunk_515698 | rust_dataset.txt | 515,698 | 512 | .panes
.get(&PaneId::Terminal(6))
.unwrap()
.position_and_size()
.x,
91,
"sixths remaining pane x position"
);
assert_eq!(
tab.tiled_panes
.panes
.get(&PaneId::Terminal(6))
.unwrap()
.positio... |
rust_dataset_chunk_515699 | rust_dataset.txt | 515,699 | 512 | │ │xxxx│xxxxxx│
// ├────┴┬─────┤ ├────┴──────┤
// │xxxxx│█████│ │xxxxxxxxxxx│
// ├─────┤█████│ ==close==> ├───────────┤
// │xxxxx│█████│ │xxxxxxxxxxx│
// ├────┬┴─────┤ ├────┬──────┤
// │xxxx│xxxxxx│ │xxxx│xxxxxx│
// └────┴────... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.