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_515500 | rust_dataset.txt | 515,500 | 512 | let new_pane_id = PaneId::Terminal(2);
let _output = Output::default();
// Create a vertical split
tab.vertical_split(new_pane_id, None, client_id, None, None)
.unwrap();
tab.handle_pty_bytes(1, Vec::from("Left".as_bytes()))
.unwrap();
tab.handle_pty_bytes(2, Vec::from("Right".as_... |
rust_dataset_chunk_515501 | rust_dataset.txt | 515,501 | 512 | )
.unwrap();
assert!(motion_effect.state_changed);
let mut output = Output::default();
tab.render(&mut output, None).unwrap();
let snapshot_after = take_snapshot(
output.serialize().unwrap().get(&client_id).unwrap().ansi(),
size.rows,
size.cols,
Palette::default(),... |
rust_dataset_chunk_515502 | rust_dataset.txt | 515,502 | 512 | _tiled_pane_vertically() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
let new_pane_id = PaneId::Terminal(2);
let mut output = Output::default();
tab.horizontal_split(new_pane_id, None, client_id, None... |
rust_dataset_chunk_515503 | rust_dataset.txt | 515,503 | 512 | _id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
let new_pane_id = PaneId::Terminal(2);
let _output = Output::default();
// Create a vertical split
tab.vertical_split(new_pane_id, None, client_id, None, None)
.unwrap();
tab.handle_pty_bytes(1, Vec::from("Left".as_bytes... |
rust_dataset_chunk_515504 | rust_dataset.txt | 515,504 | 512 | tab.toggle_floating_panes(Some(client_id), None, None)
.unwrap();
tab.new_pane(
floating_pane_id,
None,
None,
false,
true,
NewPanePlacement::Floating(Some(coordinates)),
Some(client_id),
None,
)
.unwrap();
tab.handle_pty_bytes(2, ... |
rust_dataset_chunk_515505 | rust_dataset.txt | 515,505 | 512 | None,
};
tab.toggle_floating_panes(Some(client_id), None, None)
.unwrap();
tab.new_pane(
floating_pane_id,
None,
None,
false,
true,
NewPanePlacement::Floating(Some(coordinates)),
Some(client_id),
None,
)
.unwrap();
tab.ha... |
rust_dataset_chunk_515506 | rust_dataset.txt | 515,506 | 512 | borderless: Some(false),
border_style: None,
};
tab.new_pane(
floating_pane_id,
None,
None,
false,
true,
NewPanePlacement::Floating(Some(coordinates)),
Some(client_id),
None,
)
.unwrap();
tab.handle_pty_bytes(2, Vec::from("Co... |
rust_dataset_chunk_515507 | rust_dataset.txt | 515,507 | 512 | ,
)
.unwrap();
tab.handle_pty_bytes(2, Vec::from("Pin toggle test".as_bytes()))
.unwrap();
// Render before pin toggle
tab.render(&mut output, None).unwrap();
// Calculate pin button position (3 cells left of top-right corner of floating pane)
// Default floating pane is roughly a... |
rust_dataset_chunk_515508 | rust_dataset.txt | 515,508 | 512 | (if on edge), state_changed should be true
assert!(effect.state_changed);
}
#[test]
fn a_pane_border_drag_reports_a_pane_resize() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
tab.vertical_split(PaneId::T... |
rust_dataset_chunk_515509 | rust_dataset.txt | 515,509 | 512 | output, None).unwrap();
let snapshot_before = take_snapshot(
output.serialize().unwrap().get(&client_id).unwrap().ansi(),
size.rows,
size.cols,
Palette::default(),
);
// Click on frame (not ctrl, not pin location) to start move
let frame_position = Position::new(5, 30);... |
rust_dataset_chunk_515510 | rust_dataset.txt | 515,510 | 512 | 10)),
height: Some(PercentOrFixed::Fixed(10)),
pinned: None,
borderless: Some(false),
border_style: None,
};
tab.toggle_floating_panes(Some(client_id), None, None)
.unwrap();
tab.new_pane(
floating_pane_id_1,
None,
None,
false,
... |
rust_dataset_chunk_515511 | rust_dataset.txt | 515,511 | 512 | OrFixed::Fixed(5)),
width: Some(PercentOrFixed::Fixed(30)),
height: Some(PercentOrFixed::Fixed(10)),
pinned: None,
borderless: Some(false),
border_style: None,
};
tab.toggle_floating_panes(Some(client_id), None, None)
.unwrap();
// will be pinned
tab.new... |
rust_dataset_chunk_515512 | rust_dataset.txt | 515,512 | 512 | .unwrap();
tab.handle_pty_bytes(1, Vec::from("Left".as_bytes()))
.unwrap();
tab.handle_pty_bytes(2, Vec::from("Right".as_bytes()))
.unwrap();
// Alt+click on a pane to toggle group
let effect = tab
.handle_mouse_event(
&MouseEvent::new_left_press_with_alt_event(Pos... |
rust_dataset_chunk_515513 | rust_dataset.txt | 515,513 | 512 | _2 = tab
.handle_mouse_event(
&MouseEvent::new_left_motion_with_alt_event(Position::new(5, 80)),
client_id,
)
.unwrap();
// Verify group_add effect
assert!(motion_effect_2.group_add.is_some());
}
#[test]
fn test_right_alt_click_ungroups_panes() {
let size = ... |
rust_dataset_chunk_515514 | rust_dataset.txt | 515,514 | 512 | ,
Some(PaneId::Terminal(1)),
zellij_utils::input::config_settings::default_config()
.mousebinds
.clone(),
)
.unwrap();
pty_instruction_bus.exit();
assert_eq!(
pty_instruction_bus.clone_output(),
vec!["\u{1b}[<8;71;5M".to_s... |
rust_dataset_chunk_515515 | rust_dataset.txt | 515,515 | 512 | }[<48;100;12M".to_string(),
"\u{1b}[<16;100;12m".to_string(),
],
"a ctrl drag inside a descended pane must reach the guest session"
);
assert!(
tab.pane_drawings.get(&client_id).is_none(),
"a ctrl drag inside a descended pane must not draw a host floating pane"
);... |
rust_dataset_chunk_515516 | rust_dataset.txt | 515,516 | 512 | (PaneId::Terminal(1))
.and_then(|pane| pane.guest_modal_hover(client_id))
};
let mut hovered_options = vec![];
let mut last_hovered_line = None;
for line in 0..size.rows as i32 {
let previous = hover_of(&tab);
let effect = tab
.handle_mouse_event(
... |
rust_dataset_chunk_515517 | rust_dataset.txt | 515,517 | 512 | .mousebinds
.clone(),
)
.unwrap();
pty_instruction_bus.exit();
assert_eq!(
effect.group_toggle,
Some(PaneId::Terminal(1)),
"without a descend, alt click keeps grouping panes even when the pane tracks the mouse"
);
assert!(
... |
rust_dataset_chunk_515518 | rust_dataset.txt | 515,518 | 512 | h".as_bytes()))
.unwrap();
let mut content = String::new();
for i in 0..20 {
content.push_str(&format!(
"\u{1b}]133;A\u{7}$ \u{1b}]133;B\u{7}cmd{i}\u{1b}]133;C\u{7}\r\nout{i}\u{1b}]133;D;0\u{7}\r\n"
));
}
tab.handle_pty_bytes(1, Vec::from(content.as_bytes()))
... |
rust_dataset_chunk_515519 | rust_dataset.txt | 515,519 | 512 | ())
.unwrap_or(false)
};
assert!(!pane_is_scrolled(&tab));
tab.handle_mouse_event(
&MouseEvent::new_alt_scroll_up_event(Position::new(10, 60)),
client_id,
)
.unwrap();
assert!(
pane_is_scrolled(&tab),
"alt wheel up must jump to the previous prompt"
... |
rust_dataset_chunk_515520 | rust_dataset.txt | 515,520 | 512 | format!("Line {}\r\n", i));
}
tab.handle_pty_bytes(1, Vec::from(content.as_bytes()))
.unwrap();
// Render before scroll
tab.render(&mut output, None).unwrap();
let snapshot_before = take_snapshot(
output.serialize().unwrap().get(&client_id).unwrap().ansi(),
size.rows,
... |
rust_dataset_chunk_515521 | rust_dataset.txt | 515,521 | 512 | _id).unwrap().ansi(),
size.rows,
size.cols,
Palette::default(),
);
// Scroll down
let _effect = tab
.handle_mouse_event(
&MouseEvent::new_scroll_down_event(Position::new(10, 60)),
client_id,
)
.unwrap();
// Render after scroll
... |
rust_dataset_chunk_515522 | rust_dataset.txt | 515,522 | 512 | _mouse_event(
&MouseEvent::new_scroll_up_event(Position::new(10, 30)),
client_id,
)
.unwrap();
// Render after scroll
let mut output = Output::default();
tab.render(&mut output, None).unwrap();
let snapshot_after = take_snapshot(
output.serialize().unwrap... |
rust_dataset_chunk_515523 | rust_dataset.txt | 515,523 | 512 | ();
pty_instruction_bus.exit();
assert_eq!(
pty_instruction_bus.clone_output(),
vec!["\u{1b}[<2;71;5M".to_string()],
);
assert!(effect.open_context_menu.is_none());
}
#[test]
fn test_right_click_on_unfocused_pane_opens_menu_without_changing_focus() {
let size = Size {
cols... |
rust_dataset_chunk_515524 | rust_dataset.txt | 515,524 | 512 | _position = pin_button_position(&tab, PaneId::Terminal(2));
let effect = tab
.handle_mouse_event(&MouseEvent::new_right_press_event(pin_position), client_id)
.unwrap();
tab.handle_mouse_event(
&MouseEvent::new_right_release_event(pin_position),
client_id,
)
.unwrap();
... |
rust_dataset_chunk_515525 | rust_dataset.txt | 515,525 | 512 | 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
let pane_ids_before = tab.get_all_pane_ids();
let pane_infos_before = tab.pane_infos().len();
let floating_visible_before = tab.are_floating_panes_visible();
open_test_popup(&mut tab, client_id, 42);
ass... |
rust_dataset_chunk_515526 | rust_dataset.txt | 515,526 | 512 | tab.handle_plugin_bytes(42, client_id, Vec::from("POPUP-CONTENT".as_bytes()))
.unwrap();
let mut output = Output::default();
tab.render(&mut output, None).unwrap();
let serialized = output.serialize().unwrap();
let owner_snapshot = take_snapshot(
serialized.get(&client_id).unwrap().ans... |
rust_dataset_chunk_515527 | rust_dataset.txt | 515,527 | 512 | (
&MouseEvent::new_left_press_event(Position::new(4, 5)),
client_id
),
Some(crate::tab::PopupMouseOutcome::Consumed)
);
assert_eq!(
tab.handle_popup_mouse_event(
&MouseEvent::new_left_press_event(Position::new(15, 80)),
client_id
),... |
rust_dataset_chunk_515528 | rust_dataset.txt | 515,528 | 512 | client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
assert!(!tab.mouse_gesture_is_held());
tab.handle_mouse_event(
&MouseEvent::new_left_press_event(Position::new(5, 5)),
client_id,
)
.unwrap();
assert!(tab.mouse_gesture_is_held());
tab.handle_mouse_event... |
rust_dataset_chunk_515529 | rust_dataset.txt | 515,529 | 512 | mut tab, client_id, 43, 8);
tab.close_popup_with_plugin_id(42);
assert_eq!(tab.popup_plugin_id(client_id), Some(43));
assert_eq!(tab.popup_count_for_client(client_id), 1);
}
#[test]
fn a_menu_popup_replaces_only_menus_and_never_a_prompt() {
let size = Size {
cols: 121,
rows: 20,
};
... |
rust_dataset_chunk_515530 | rust_dataset.txt | 515,530 | 512 | {
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(plugin_sender));
let area = ze... |
rust_dataset_chunk_515531 | rust_dataset.txt | 515,531 | 512 | ("LOWER-POPUP"));
}
#[test]
fn test_middle_click_forwards_to_active_pane() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
let _output = Output::default();
tab.handle_pty_bytes(1, Vec::from("Active pane".as... |
rust_dataset_chunk_515532 | rust_dataset.txt | 515,532 | 512 | Terminal(2);
let _output = Output::default();
// Create a vertical split
tab.vertical_split(new_pane_id, None, client_id, None, None)
.unwrap();
tab.handle_pty_bytes(1, Vec::from("Left".as_bytes()))
.unwrap();
tab.handle_pty_bytes(2, Vec::from("Right".as_bytes()))
.unwrap()... |
rust_dataset_chunk_515533 | rust_dataset.txt | 515,533 | 512 | &MouseEvent::new_left_motion_with_ctrl_event(motion_position),
client_id,
)
.unwrap();
tab.handle_mouse_event(
&MouseEvent::new_left_release_with_ctrl_event(motion_position),
client_id,
)
.unwrap();
assert!(resize_effect.state_changed);
// No... |
rust_dataset_chunk_515534 | rust_dataset.txt | 515,534 | 512 | Some(client_id),
None,
)
.unwrap();
tab.handle_pty_bytes(2, Vec::from("Floating pane".as_bytes()))
.unwrap();
// Alt+click on floating pane to toggle group
let effect = tab
.handle_mouse_event(
&MouseEvent::new_left_press_with_alt_event(Position::new(10, 60)),
... |
rust_dataset_chunk_515535 | rust_dataset.txt | 515,535 | 512 | (2, Vec::from("Movable pane".as_bytes()))
.unwrap();
tab.render(&mut output, None).unwrap();
let snapshot_before = take_snapshot(
output.serialize().unwrap().get(&client_id).unwrap().ansi(),
size.rows,
size.cols,
Palette::default(),
);
let frame_position = Posit... |
rust_dataset_chunk_515536 | rust_dataset.txt | 515,536 | 512 | ),
client_id,
)
.unwrap();
assert!(effect.state_changed);
let mut output = Output::default();
tab.render(&mut output, None).unwrap();
let snapshot_after = take_snapshot(
output.serialize().unwrap().get(&client_id).unwrap().ansi(),
size.rows,
size.col... |
rust_dataset_chunk_515537 | rust_dataset.txt | 515,537 | 512 | = PaneId::Terminal(2);
let mut output = Output::default();
tab.vertical_split(new_pane_id, None, client_id, None, None)
.unwrap();
tab.handle_pty_bytes(1, Vec::from("Left pane".as_bytes()))
.unwrap();
tab.handle_pty_bytes(2, Vec::from("Right pane".as_bytes()))
.unwrap();
... |
rust_dataset_chunk_515538 | rust_dataset.txt | 515,538 | 512 | new_ctrl_scroll_down_event(inactive_pane_position),
client_id,
)
.unwrap();
assert!(effect.state_changed);
let mut output = Output::default();
tab.render(&mut output, None).unwrap();
let snapshot_after = take_snapshot(
output.serialize().unwrap().get(&client_id).unw... |
rust_dataset_chunk_515539 | rust_dataset.txt | 515,539 | 512 | cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
let new_pane_id = PaneId::Terminal(2);
let mut output = Output::default();
tab.toggle_floating_panes(Some(client_id), None, None)
.unwrap();
tab.new_pane(
new_... |
rust_dataset_chunk_515540 | rust_dataset.txt | 515,540 | 512 | : Some(true),
borderless: Some(false),
border_style: None,
};
tab.new_pane(
new_pane_id,
None,
None,
false,
true,
NewPanePlacement::Floating(Some(coordinates)),
Some(client_id),
None,
)
.unwrap();
tab.handle_pty_bytes(... |
rust_dataset_chunk_515541 | rust_dataset.txt | 515,541 | 512 | None,
)
.unwrap();
tab.handle_pty_bytes(1, Vec::from("Tiled pane".as_bytes()))
.unwrap();
tab.handle_pty_bytes(2, Vec::from("Floating pane".as_bytes()))
.unwrap();
tab.render(&mut output, None).unwrap();
let snapshot_before = take_snapshot(
output.serialize().unwrap().... |
rust_dataset_chunk_515542 | rust_dataset.txt | 515,542 | 512 | 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
let new_pane_id = PaneId::Terminal(2);
tab.vertical_split(new_pane_id, None, client_id, None, None)
.unwrap();
tab.update_mouse_scroll_resize(false);
let pane_geom_before = tab.get_active_pane(client... |
rust_dataset_chunk_515543 | rust_dataset.txt | 515,543 | 512 | ::from_kdl(base_layout, Some("file_name.kdl".into()), None, None)
.unwrap()
.template
.unwrap();
let new_terminal_ids = vec![(1, None), (2, None), (3, None)];
let mut tab = create_new_tab_with_stacked_pane_list(
size,
ModeInfo::default(),
true,
... |
rust_dataset_chunk_515544 | rust_dataset.txt | 515,544 | 512 | ,
rows: 38,
};
let stacked = r#"
layout {
pane split_direction="vertical" {
pane {
pane focus=true
pane stacked=true stack_orientation="horizontal" size="30%" { pane; }
}
pane stacked=true stack_o... |
rust_dataset_chunk_515545 | rust_dataset.txt | 515,545 | 512 | let (layout, _) = Layout::from_kdl(
r#"
layout {
pane split_direction="vertical" {
pane {
pane focus=true
pane stacked=true stack_orientation="horizontal" size="30%" { pane; }
}
pane stacked=true stack_o... |
rust_dataset_chunk_515546 | rust_dataset.txt | 515,546 | 512 | None)];
let mut tab = create_new_tab_with_stacked_pane_list(
size,
ModeInfo::default(),
true,
Some((base_layout, new_terminal_ids)),
);
let client_id = 1;
let mut output = Output::default();
tab.render(&mut output, None).unwrap();
let (stack_list_id, list) = ta... |
rust_dataset_chunk_515547 | rust_dataset.txt | 515,547 | 512 | ane_count(&tab), 3);
tab.degroupify_all();
assert!(
tab.stack_lists.is_empty(),
"degroupify dissolves the stack list into a classic in-grid stack"
);
tab.groupify_all();
let orientations: Vec<StackListOrientation> =
tab.stack_lists.values().map(|l| l.orientation).collect();... |
rust_dataset_chunk_515548 | rust_dataset.txt | 515,548 | 512 | 4;
let first_entry_start = (entry_cols - row_width) / 2;
assert_eq!(row_layout.entries[0].x, first_entry_start);
let members = list.members.clone();
let second_tab_start = entry_x + first_entry_start + 6;
let second_member = list.members[1];
assert_eq!(
tab.stack_list_member_at_point(
... |
rust_dataset_chunk_515549 | rust_dataset.txt | 515,549 | 512 | unwrap();
let mut resized = Output::default();
tab.render(&mut resized, None).unwrap();
let rendered = take_snapshot(
resized.serialize().unwrap().get(&1).unwrap().ansi(),
20,
20,
Palette::default(),
);
assert!(rendered.contains("‹1 "), "{}", rendered);
assert!(re... |
rust_dataset_chunk_515550 | rust_dataset.txt | 515,550 | 512 | let b = members[1];
let d = PaneId::Terminal(2);
assert_eq!(tab.get_active_pane_id(1), Some(a));
assert!(tab.move_focus_right(1).unwrap());
assert_eq!(tab.get_active_pane_id(1), Some(b));
assert!(tab.move_focus_left(1).unwrap());
assert_eq!(tab.get_active_pane_id(1), Some(a));
assert!(tab.... |
rust_dataset_chunk_515551 | rust_dataset.txt | 515,551 | 512 | 1, None), (2, None), (3, None)];
let mut tab = create_new_tab_with_stacked_pane_list(
size,
ModeInfo::default(),
true,
Some((base_layout, new_terminal_ids)),
);
let mut output = Output::default();
tab.render(&mut output, None).unwrap();
let members = tab.stack_lists.v... |
rust_dataset_chunk_515552 | rust_dataset.txt | 515,552 | 512 | ane_id(1), Some(b));
assert!(tab.is_fullscreen_active());
tab.resize(1, ResizeStrategy::new(Resize::Increase, None))
.unwrap();
assert!(tab.is_fullscreen_active());
assert_eq!(tab.tiled_panes.visible_panes_count(), 1);
}
#[test]
fn stack_titles_are_found_and_toggled_through_any_member() {
... |
rust_dataset_chunk_515553 | rust_dataset.txt | 515,553 | 512 | _list_row_layout_centers_entries_that_fit() {
let members = [
(PaneId::Terminal(1), 3),
(PaneId::Terminal(2), 8),
(PaneId::Terminal(3), 2),
];
let layout = super::layout_stack_list_row(&members, 1, 31);
let positions: Vec<(usize, usize)> = layout
.entries
.iter()
... |
rust_dataset_chunk_515554 | rust_dataset.txt | 515,554 | 512 | _ctrl_scroll_up_merging_stacks_preserves_all_panes() {
let size = Size {
cols: 150,
rows: 40,
};
let client_id = 1;
let mut output = Output::default();
let mut tab = create_new_tab_with_stacked_pane_list(
size,
ModeInfo::default(),
true,
Some(two_adjac... |
rust_dataset_chunk_515555 | rust_dataset.txt | 515,555 | 512 | resized it back to the visible size. Shells (nushell,
// pwsh, bash) redraw their prompt on each WINCH, which blanks out
// previously-visible rows of output — visible to the user as "truncated
// scrollback" when they focus back to that pane.
//
// The fix syncs stacked_pane_list mode immediately after the classic in... |
rust_dataset_chunk_515556 | rust_dataset.txt | 515,556 | 512 | stack: pane 2 (the pre-existing member) must be in suppressed_panes,
// and the visible member (pane 3) must be in tiled_panes with a non-fixed
// row dimension (i.e., not the collapsed 1-row tab-strip form).
assert!(
tab.has_stack_lists(),
"stacked_pane_list mode should have groupified the... |
rust_dataset_chunk_515557 | rust_dataset.txt | 515,557 | 512 | in_grid_ids.sort();
assert_eq!(
in_grid_ids, pane_ids_before,
"all panes must be present in the grid after the resize, none orphaned"
);
let mut output = Output::default();
tab.render(&mut output, None).unwrap();
let mut pane_ids_final = tab.get_all_pane_ids();
pane_ids_fina... |
rust_dataset_chunk_515558 | rust_dataset.txt | 515,558 | 512 | underline: true,
tooltip_text: Some("Tool Tooltip".to_string()),
}];
tab.set_plugin_regex_highlights_for_pane(
PaneId::Terminal(1),
20,
highlights,
&Style::default(),
);
let hover_position = Position::new(1, 12);
let _effect = tab
.handle_mous... |
rust_dataset_chunk_515559 | rust_dataset.txt | 515,559 | 512 | None,
)
.unwrap();
tab.handle_pty_bytes(3, Vec::from("\n\n\nI am the in-place pane".as_bytes()))
.unwrap();
// Close the in-place pane — pane 2 should be restored
tab.close_pane(PaneId::Terminal(3), false, None);
tab.render(&mut output, None).unwrap();
let snapshot = take_s... |
rust_dataset_chunk_515560 | rust_dataset.txt | 515,560 | 512 | 3), false, None);
tab.render(&mut output, None).unwrap();
let snapshot = take_snapshot(
output.serialize().unwrap().get(&client_id).unwrap().ansi(),
size.rows,
size.cols,
Palette::default(),
);
// Snapshot shows only pane 1 (pane 2 was permanently closed, not restored)
... |
rust_dataset_chunk_515561 | rust_dataset.txt | 515,561 | 512 | lines = true;
let osc8_hyperlinks = true;
let explicitly_disable_kitty_keyboard_protocol = false;
let advanced_mouse_actions = true;
let mouse_scroll_resize = true;
let web_sharing = WebSharing::Off;
let web_server_ip = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1));
let web_server_port = 8080;
... |
rust_dataset_chunk_515562 | rust_dataset.txt | 515,562 | 512 | unwrap();
// Set plugin highlight on pane 1 for pattern "foo"
let highlights = vec![RegexHighlight {
pattern: "foo".into(),
style: HighlightStyle::Emphasis0,
layer: HighlightLayer::Hint,
context: BTreeMap::new(),
on_hover: false,
bold: false,
italic: fals... |
rust_dataset_chunk_515563 | rust_dataset.txt | 515,563 | 512 | phasis0,
layer: HighlightLayer::Hint,
context: BTreeMap::new(),
on_hover: false,
bold: false,
italic: false,
underline: true,
tooltip_text: None,
}];
tab.set_plugin_regex_highlights_for_pane(
PaneId::Terminal(1),
42,
highlights,
... |
rust_dataset_chunk_515564 | rust_dataset.txt | 515,564 | 512 | tab.render(&mut output, None).unwrap();
let snapshot_with_hover = take_snapshot(
output.serialize().unwrap().get(&client_id).unwrap().ansi(),
size.rows,
size.cols,
Palette::default(),
);
assert_snapshot!(snapshot_with_hover);
// Move hover away from the match
let mu... |
rust_dataset_chunk_515565 | rust_dataset.txt | 515,565 | 512 | _effect = tab
.handle_mouse_event(
&MouseEvent::new_buttonless_motion(hover_position),
client_id,
)
.unwrap();
tab.render(&mut output, None).unwrap();
let snapshot = take_snapshot(
output.serialize().unwrap().get(&client_id).unwrap().ansi(),
size... |
rust_dataset_chunk_515566 | rust_dataset.txt | 515,566 | 512 | }
assert!(
!found_highlight_clicked,
"HighlightClicked should NOT be sent when terminal has mouse tracking"
);
}
#[test]
fn set_and_clear_highlights_across_tiled_and_floating() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_n... |
rust_dataset_chunk_515567 | rust_dataset.txt | 515,567 | 512 | layer: HighlightLayer::Hint,
context: BTreeMap::new(),
on_hover: false,
bold: false,
italic: false,
underline: false,
tooltip_text: None,
}];
tab.set_plugin_regex_highlights_for_pane(PaneId::Terminal(1), 2, h2.clone(), &Style::default());
tab.set_plugin_regex... |
rust_dataset_chunk_515568 | rust_dataset.txt | 515,568 | 512 | Clicked
let click_position = Position::new(1, 12);
let _effect = tab
.handle_mouse_event(&MouseEvent::new_left_press_event(click_position), client_id)
.unwrap();
let mut found_highlight_clicked = false;
while let Ok((instruction, _ctx)) = mock_plugin_receiver.try_recv() {
if mat... |
rust_dataset_chunk_515569 | rust_dataset.txt | 515,569 | 512 | "
);
// Group toggle effect should have been produced
assert_eq!(effect.group_toggle, Some(PaneId::Terminal(1)));
}
#[test]
fn hover_over_highlight_with_tooltip_caches_tooltip() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size... |
rust_dataset_chunk_515570 | rust_dataset.txt | 515,570 | 512 | fn higher_layer_highlight_style_wins_in_rendered_output() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
let mut output = Output::default();
tab.handle_pty_bytes(1, Vec::from("overlap_text here\n".as_bytes(... |
rust_dataset_chunk_515571 | rust_dataset.txt | 515,571 | 512 | find a reset before overlap_text");
let sgr_block = &raw_str[reset_pos..idx];
assert!(
sgr_block.contains("\x1b[1m"),
"Tool layer bold styling (\\x1b[1m) should be present before overlap_text, got: {:?}",
sgr_block
);
assert!(
!sgr_block.contains("\x1b[4m"),
"Hi... |
rust_dataset_chunk_515572 | rust_dataset.txt | 515,572 | 512 | _click.alt = true;
let _effect = tab.handle_mouse_event(&alt_click, client_id).unwrap();
// Drain the plugin receiver and find the HighlightClicked instruction
let mut found_plugin_id = None;
while let Ok((instruction, _ctx)) = mock_plugin_receiver.try_recv() {
if let PluginInstruction::Highlig... |
rust_dataset_chunk_515573 | rust_dataset.txt | 515,573 | 512 | let _effect = tab
.handle_mouse_event(
&MouseEvent::new_buttonless_motion(hover_position),
client_id,
)
.unwrap();
tab.render(&mut output, None).unwrap();
let snapshot = take_snapshot(
output.serialize().unwrap().get(&client_id).unwrap().ansi(),
... |
rust_dataset_chunk_515574 | rust_dataset.txt | 515,574 | 512 | _for_pane(PaneId::Terminal(1), 20, h2, &Style::default());
tab.set_plugin_regex_highlights_for_pane(PaneId::Terminal(1), 30, h3, &Style::default());
tab.render(&mut output, None).unwrap();
let raw_output = output.serialize().unwrap();
let raw_str = raw_output.get(&client_id).unwrap().ansi();
// Th... |
rust_dataset_chunk_515575 | rust_dataset.txt | 515,575 | 512 | 2);
// Create a vertical split: pane 1 (left), pane 2 (right)
tab.vertical_split(new_pane_id, None, client_id, None, None)
.unwrap();
// Active pane is pane 2 (right) after split
assert_eq!(tab.get_active_pane_id(client_id), Some(PaneId::Terminal(2)));
// Enable focus follows mouse
ta... |
rust_dataset_chunk_515576 | rust_dataset.txt | 515,576 | 512 | _pane_id_2 = PaneId::Terminal(3);
let coordinates_1 = FloatingPaneCoordinates {
x: Some(PercentOrFixed::Fixed(5)),
y: Some(PercentOrFixed::Fixed(5)),
width: Some(PercentOrFixed::Fixed(10)),
height: Some(PercentOrFixed::Fixed(10)),
pinned: None,
borderless: Some(false... |
rust_dataset_chunk_515577 | rust_dataset.txt | 515,577 | 512 | tab = create_new_tab(size, ModeInfo::default());
let new_pane_id = PaneId::Terminal(2);
tab.vertical_split(new_pane_id, None, client_id, None, None)
.unwrap();
// Mark pane 1 (left) as unselectable
tab.set_pane_selectable(PaneId::Terminal(1), false);
// Active pane is pane 2 (right)
... |
rust_dataset_chunk_515578 | rust_dataset.txt | 515,578 | 512 | create_new_tab(size, ModeInfo::default());
let new_pane_id = PaneId::Terminal(2);
tab.vertical_split(new_pane_id, None, client_id, None, None)
.unwrap();
// Active pane is pane 2 (right)
assert_eq!(tab.get_active_pane_id(client_id), Some(PaneId::Terminal(2)));
// Enable focus follows mou... |
rust_dataset_chunk_515579 | rust_dataset.txt | 515,579 | 512 | _pane_id(client_id), Some(PaneId::Terminal(1)));
}
#[test]
fn focus_follows_mouse_ignores_tiled_pane_when_floating_visible() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
let new_pane_id = PaneId::Terminal(2);... |
rust_dataset_chunk_515580 | rust_dataset.txt | 515,580 | 512 | (2);
let floating_pane_id_2 = PaneId::Terminal(3);
tab.toggle_floating_panes(Some(client_id), None, None)
.unwrap();
tab.new_pane(
floating_pane_id_1,
None,
None,
false,
true,
NewPanePlacement::Floating(Some(FloatingPaneCoordinates {
x: Som... |
rust_dataset_chunk_515581 | rust_dataset.txt | 515,581 | 512 | iled_layout {
tab {
pane split_direction="vertical" {
pane
pane stacked=true { children; }
}
}
}
}
"#;
let layout = Layout::from_kdl(swap_layouts, Some("file_name.kdl".into... |
rust_dataset_chunk_515582 | rust_dataset.txt | 515,582 | 512 | .next()
.expect("Expected at least one stacked one-liner pane");
// Hover in the middle of the one-liner pane
let hover_row = one_liner_geom.y as i32;
let hover_col = (one_liner_geom.x + one_liner_geom.cols.as_usize() / 2) as u16;
let _effect = tab
.handle_mouse_event(
&Mou... |
rust_dataset_chunk_515583 | rust_dataset.txt | 515,583 | 512 | ty_instruction_bus.exit();
// Verify the SGR left-click escape sequence was sent to the terminal.
let output = pty_instruction_bus.clone_output();
assert!(
!output.is_empty(),
"Expected click to be forwarded to terminal"
);
// The output should contain an SGR mouse press sequence: \... |
rust_dataset_chunk_515584 | rust_dataset.txt | 515,584 | 512 | 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();
// Create two floating panes
let floatin... |
rust_dataset_chunk_515585 | rust_dataset.txt | 515,585 | 512 | );
} else {
pty_instruction_bus.exit();
// Position may not have landed on floating pane 1 — this is a layout-dependent test.
// Adjust the position if this branch is hit.
}
}
#[test]
fn mouse_click_through_does_not_apply_when_focus_follows_mouse_is_enabled() {
let size = Size {
... |
rust_dataset_chunk_515586 | rust_dataset.txt | 515,586 | 512 | _selection_on_non_mouse_mode_pane() {
let size = Size {
cols: 121,
rows: 20,
};
let client_id = 1;
let mut tab = create_new_tab(size, ModeInfo::default());
let new_pane_id = PaneId::Terminal(2);
tab.vertical_split(new_pane_id, None, client_id, None, None)
.unwrap();
... |
rust_dataset_chunk_515587 | rust_dataset.txt | 515,587 | 512 | .get_active_pane_id(client_id), Some(PaneId::Terminal(1)));
// Click pane 2 to refocus it
tab.handle_mouse_event(
&MouseEvent::new_left_press_event(Position::new(5, 90)),
client_id,
)
.unwrap();
assert_eq!(tab.get_active_pane_id(client_id), Some(PaneId::Terminal(2)));
// Now en... |
rust_dataset_chunk_515588 | rust_dataset.txt | 515,588 | 512 | terminal_emulator_colors = Rc::new(RefCell::new(Palette::default()));
let copy_options = CopyOptions::default();
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let current_group = Rc::new(RefCell::new... |
rust_dataset_chunk_515589 | rust_dataset.txt | 515,589 | 512 | ::panes::grid::{namespace_notification_id, PendingNotification};
let mut output = String::new();
while let Ok((instruction, _)) = receiver.try_recv() {
if let ScreenInstruction::ForwardDesktopNotifications {
pane_id,
notifications,
} = instruction
{
fo... |
rust_dataset_chunk_515590 | rust_dataset.txt | 515,590 | 512 | osc99_notification_st_terminator_forwarded() {
// Same as above but with ESC \ (ST) terminator
let size = Size { cols: 80, rows: 24 };
let (mut tab, server_receiver) = create_new_tab_with_server_receiver(size, ModeInfo::default());
tab.handle_pty_bytes(1, Vec::from("\x1b]99;i=test2:p=title;Build done\... |
rust_dataset_chunk_515591 | rust_dataset.txt | 515,591 | 512 | );
assert!(
output.contains("i=p1.n2"),
"Second notification should be namespaced, got: {:?}",
output
);
assert!(
output.contains("First") && output.contains("Second"),
"Both payloads should be forwarded, got: {:?}",
output
);
}
#[test]
fn osc99_chunk... |
rust_dataset_chunk_515592 | rust_dataset.txt | 515,592 | 512 | =report:u=2;Important!\x07"),
)
.unwrap();
let output = collect_render_output(&server_receiver);
assert!(
output.contains("i=p1r.rich"),
"Identifier should be namespaced with 'r' flag (a=report present), got: {:?}",
output
);
assert!(
output.contains("p=title"),... |
rust_dataset_chunk_515593 | rust_dataset.txt | 515,593 | 512 | "Should have one pending notification"
);
let notification = grid.pending_desktop_notifications.first().unwrap();
let payload = match notification {
crate::panes::grid::PendingNotification::Osc99 { payload, .. } => payload.clone(),
other => panic!("Expected an OSC 99 notification, got: {:?... |
rust_dataset_chunk_515594 | rust_dataset.txt | 515,594 | 512 | _none() {
use crate::screen::denormalize_notification_response;
// A response without the p<N>. namespace pattern should return None
let result = denormalize_notification_response(b"i=plain_id;data");
assert!(
result.is_none(),
"Should return None for non-namespaced response"
);
}
... |
rust_dataset_chunk_515595 | rust_dataset.txt | 515,595 | 512 | 99_namespace_ensures_report_action() {
use crate::panes::grid::namespace_notification_id;
// a=focus → a=focus,report
let result = namespace_notification_id("i=test:p=title:a=focus", 1, false);
assert!(
result.contains("a=focus,report"),
"a=focus should be augmented with report, got: {:... |
rust_dataset_chunk_515596 | rust_dataset.txt | 515,596 | 512 | =focus should NOT produce 'r' flag, got: {:?}",
namespaced
);
assert!(
namespaced.contains("a=focus,report"),
"a=focus should be augmented with report for the host terminal, got: {:?}",
namespaced
);
let response = format!("i=p5.myid;activated");
let response = denorm... |
rust_dataset_chunk_515597 | rust_dataset.txt | 515,597 | 512 | "dismissing a notification is not activating it"
);
}
#[test]
fn osc99_liveness_answer_is_restricted_to_the_asking_pane() {
use crate::screen::denormalize_notification_response;
let response =
denormalize_notification_response(b"i=p3.myid:p=alive;p3.one,p4r.other,p3r.two").unwrap();
le... |
rust_dataset_chunk_515598 | rust_dataset.txt | 515,598 | 512 | the cursor"
);
}
#[test]
fn host_focus_events_only_reach_panes_that_asked_for_them() {
let size = Size {
cols: 121,
rows: 20,
};
let tty_stdin_bytes = Arc::new(Mutex::new(BTreeMap::new()));
let os_api = Box::new(FakeInputOutput {
tty_stdin_bytes: tty_stdin_bytes.clone(),
... |
rust_dataset_chunk_515599 | rust_dataset.txt | 515,599 | 512 | let mut tab = create_new_tab(size, ModeInfo::default());
tab.set_pane_border_style(
PaneId::Terminal(1),
border_style_override(LineStyle::Double),
);
let snapshot = render_tab(&mut tab, size, client_id);
assert!(snapshot.contains('╔'), "{}", snapshot);
assert!(snapshot.contains('║')... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.