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_513700 | rust_dataset.txt | 513,700 | 512 | terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debug,
arrow_fonts,
styled_underlines,
osc8_hyper... |
rust_dataset_chunk_513701 | rust_dataset.txt | 513,701 | 512 | let mut grid = Grid::new(
41,
110,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
... |
rust_dataset_chunk_513702 | rust_dataset.txt | 513,702 | 512 | ;
let styled_underlines = true;
let osc8_hyperlinks = true;
let explicitly_disable_kitty_keyboard_protocol = false;
let mut grid = Grid::new(
41,
110,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new()... |
rust_dataset_chunk_513703 | rust_dataset.txt | 513,703 | 512 | _emulator_color_codes = 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;
let mut grid = Grid::new(
41,
110,
Rc::new(RefCell::... |
rust_dataset_chunk_513704 | rust_dataset.txt | 513,704 | 512 | ::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let debug = false;
let arrow_fonts = true;
let styled_underlines = true;
let osc8_hyperlinks = true;
let explicitly_disable_k... |
rust_dataset_chunk_513705 | rust_dataset.txt | 513,705 | 512 | assert_snapshot!(format!("{:?}", grid));
}
#[test]
fn vttest2_10() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let debug = false;
let arrow_fon... |
rust_dataset_chunk_513706 | rust_dataset.txt | 513,706 | 512 | = "vttest2-11";
let content = read_fixture(fixture_name);
vte_parser.feed(&mut grid, &content);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
fn vttest2_12() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let ter... |
rust_dataset_chunk_513707 | rust_dataset.txt | 513,707 | 512 | ,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
);
let fixture_name = "vttest2-13";
let content = read_fixture(fixture_name);
vte_parser.feed(&mut grid, &content);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
fn vt... |
rust_dataset_chunk_513708 | rust_dataset.txt | 513,708 | 512 | )),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
);
let fixture_name = "vttest3-0";
let content = rea... |
rust_dataset_chunk_513709 | rust_dataset.txt | 513,709 | 512 | terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
... |
rust_dataset_chunk_513710 | rust_dataset.txt | 513,710 | 512 | mut grid = Grid::new(
51,
97,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
S... |
rust_dataset_chunk_513711 | rust_dataset.txt | 513,711 | 512 | let styled_underlines = true;
let osc8_hyperlinks = true;
let explicitly_disable_kitty_keyboard_protocol = false;
let mut grid = Grid::new(
51,
97,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),... |
rust_dataset_chunk_513712 | rust_dataset.txt | 513,712 | 512 | ::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;
let mut grid = Grid::new(
51,
97,
Rc::new(RefCell::new(Palette::default())),
... |
rust_dataset_chunk_513713 | rust_dataset.txt | 513,713 | 512 | ::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = 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;
let mut gri... |
rust_dataset_chunk_513714 | rust_dataset.txt | 513,714 | 512 | _wrap() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let debug = false;
let arrow_fonts = true;
let styled_underlines = true;
let osc8_hyp... |
rust_dataset_chunk_513715 | rust_dataset.txt | 513,715 | 512 | );
vte_parser.feed(&mut grid, &content);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
fn delete_char_in_middle_of_line_with_widechar() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes ... |
rust_dataset_chunk_513716 | rust_dataset.txt | 513,716 | 512 | styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
);
let fixture_name = "wide-chars-delete-middle-after-multi";
let content = read_fixture(fixture_name);
vte_parser.feed(&mut grid, &content);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
fn... |
rust_dataset_chunk_513717 | rust_dataset.txt | 513,717 | 512 | sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
);
let fixture_name = "bash_delete_wide_characters";
let... |
rust_dataset_chunk_513718 | rust_dataset.txt | 513,718 | 512 | Cell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debug,
arrow_fonts,
style... |
rust_dataset_chunk_513719 | rust_dataset.txt | 513,719 | 512 | osc8_hyperlinks = true;
let explicitly_disable_kitty_keyboard_protocol = false;
let mut grid = Grid::new(
21,
104,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
... |
rust_dataset_chunk_513720 | rust_dataset.txt | 513,720 | 512 | ::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;
let mut grid = Grid::new(
21,
93,
Rc::new(RefCell::new(Palette::default())),
termin... |
rust_dataset_chunk_513721 | rust_dataset.txt | 513,721 | 512 | fn wrap_wide_characters_in_the_middle_of_the_line() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let debug = false;
let arrow_fonts = true;
le... |
rust_dataset_chunk_513722 | rust_dataset.txt | 513,722 | 512 | _line_end";
let content = read_fixture(fixture_name);
vte_parser.feed(&mut grid, &content);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
fn copy_selected_text_from_viewport() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default... |
rust_dataset_chunk_513723 | rust_dataset.txt | 513,723 | 512 | false;
let mut grid = Grid::new(
22,
73,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default... |
rust_dataset_chunk_513724 | rust_dataset.txt | 513,724 | 512 | , 35, and gets selected even if only the first column is selected
grid.end_selection(&Position::new(2, 8));
let text = grid.get_selected_text();
assert_eq!(
text.unwrap(),
"eu scelerisque felis imperdiet proin fermentum leo.\nCursus risus at ultrices mi tempus.\nLaoreet id donec ultrices tin... |
rust_dataset_chunk_513725 | rust_dataset.txt | 513,725 | 512 | use fake TTY input replicated from these scenarios.
*
*/
#[test]
fn run_bandwhich_from_fish_shell() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
l... |
rust_dataset_chunk_513726 | rust_dataset.txt | 513,726 | 512 | fixture_name = "fish_tab_completion_options";
let content = read_fixture(fixture_name);
vte_parser.feed(&mut grid, &content);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
pub fn fish_select_tab_completion_options() {
// the difference between this and the previous test is that here we press <TAB... |
rust_dataset_chunk_513727 | rust_dataset.txt | 513,727 | 512 | line (26)
// this tests also has other steps afterwards that fills the line with the next line in the
// sixel_image_store,
// file
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::n... |
rust_dataset_chunk_513728 | rust_dataset.txt | 513,728 | 512 | = false;
let mut grid = Grid::new(
28,
116,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::defa... |
rust_dataset_chunk_513729 | rust_dataset.txt | 513,729 | 512 | te_parser.feed(&mut grid, &content);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
pub fn htop() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
... |
rust_dataset_chunk_513730 | rust_dataset.txt | 513,730 | 512 | );
let fixture_name = "htop_scrolling";
let content = read_fixture(fixture_name);
vte_parser.feed(&mut grid, &content);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
pub fn htop_right_scrolling() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::... |
rust_dataset_chunk_513731 | rust_dataset.txt | 513,731 | 512 | ;
let osc8_hyperlinks = true;
let explicitly_disable_kitty_keyboard_protocol = false;
let mut grid = Grid::new(
28,
116,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(N... |
rust_dataset_chunk_513732 | rust_dataset.txt | 513,732 | 512 | Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let debug = false;
let arrow_fonts = true;
let styled_underlines = true;
let osc8_hyperlinks = true;
let explicitly_disable_kit... |
rust_dataset_chunk_513733 | rust_dataset.txt | 513,733 | 512 | :?}", grid));
}
#[test]
pub fn bash_cursor_linewrap() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let debug = false;
let arrow_fonts = true;
... |
rust_dataset_chunk_513734 | rust_dataset.txt | 513,734 | 512 | debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
);
let fixture_name = "fish_paste_multiline";
let content = read_fixture(fixture_name);
vte_parser.feed(&mut grid, &content);
assert_snapshot!(format!("{:?}", g... |
rust_dataset_chunk_513735 | rust_dataset.txt | 513,735 | 512 | ,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kit... |
rust_dataset_chunk_513736 | rust_dataset.txt | 513,736 | 512 | 56,
235,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debu... |
rust_dataset_chunk_513737 | rust_dataset.txt | 513,737 | 512 | ]
pub fn scroll_up() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let debug = false;
let arrow_fonts = true;
let styled_underlines = true;
... |
rust_dataset_chunk_513738 | rust_dataset.txt | 513,738 | 512 | _name);
vte_parser.feed(&mut grid, &content);
grid.scroll_up_one_line();
grid.scroll_down_one_line();
assert_snapshot!(format!("{:?}", grid));
}
#[test]
pub fn scroll_up_with_line_wraps() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageSto... |
rust_dataset_chunk_513739 | rust_dataset.txt | 513,739 | 512 | Style::default(),
debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
);
let fixture_name = "scrolling";
let content = read_fixture(fixture_name);
vte_parser.feed(&mut grid, &content);
grid.scroll_up_one_... |
rust_dataset_chunk_513740 | rust_dataset.txt | 513,740 | 512 | itty_keyboard_protocol = false;
let mut grid = Grid::new(
10,
25,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(... |
rust_dataset_chunk_513741 | rust_dataset.txt | 513,741 | 512 | {1b}[sine 4 >fill to 20_<";
parse(content, &mut grid);
// Move real cursor position up three lines
let content = "\u{1b}[3A";
parse(content, &mut grid);
// Truncate top of terminal, resetting cursor (but not saved cursor)
grid.change_size(3, 20);
// Wrap, resetting cursor again (but not save... |
rust_dataset_chunk_513742 | rust_dataset.txt | 513,742 | 512 | grid);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
fn saved_cursor_across_resize_rewrap() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
le... |
rust_dataset_chunk_513743 | rust_dataset.txt | 513,743 | 512 | mut grid = Grid::new(
34,
114,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
... |
rust_dataset_chunk_513744 | rust_dataset.txt | 513,744 | 512 | let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let debug = false;
let arrow_fonts = true;
let styled_underlines = true;
let osc8_hyperlinks = tru... |
rust_dataset_chunk_513745 | rust_dataset.txt | 513,745 | 512 | _bell";
let content = read_fixture(fixture_name);
vte_parser.feed(&mut grid, &content);
assert!(grid.ring_bell);
}
#[test]
pub fn alternate_screen_change_size() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let termin... |
rust_dataset_chunk_513746 | rust_dataset.txt | 513,746 | 512 | new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
)... |
rust_dataset_chunk_513747 | rust_dataset.txt | 513,747 | 512 | proper place (either before the replaced non-wide
// character if the cursor was "in the middle" of the wide character, or after the character if
// it was "in the beginning" of the wide character)
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageSto... |
rust_dataset_chunk_513748 | rust_dataset.txt | 513,748 | 512 | ,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
);
let fixture_name = "scroll_down";
let content = read_fixture(fixture_name);
vte_parser.feed(&mut grid, &content);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
pub ... |
rust_dataset_chunk_513749 | rust_dataset.txt | 513,749 | 512 | _image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
);
let content = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfoo\u{1b}[14Sba... |
rust_dataset_chunk_513750 | rust_dataset.txt | 513,750 | 512 | let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = 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_protoc... |
rust_dataset_chunk_513751 | rust_dataset.txt | 513,751 | 512 | sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
);
let content = "foo\u{1b}[2D\u{1b}[2@".as_bytes();
vte... |
rust_dataset_chunk_513752 | rust_dataset.txt | 513,752 | 512 | _grid(10, 25);
let mut parser = vt_parser::Parser::new();
for step in 0..18u8 {
let width = if step < 12 { 20 } else { 10 + (step % 3) * 10 };
if step >= 12 {
parser.feed(&mut grid, b"\x1b[3;4H ");
}
let bytes = format!(
"\u{1b}[3;4H\u{1b}P9;1q\"1;1;{};1... |
rust_dataset_chunk_513753 | rust_dataset.txt | 513,753 | 512 | assert_eq!(sixel_chunks.len(), 1);
}
#[test]
pub fn sixel_images_are_reaped_when_resetting() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let cha... |
rust_dataset_chunk_513754 | rust_dataset.txt | 513,754 | 512 | false;
let mut grid = Grid::new(
30,
112,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
character_cell_size,
sixel_image_store.clone(),
Rc::new(RefCell::new(KittyImageStore::defaul... |
rust_dataset_chunk_513755 | rust_dataset.txt | 513,755 | 512 | ::new(KittyImageStore::default())),
Style::default(),
debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
);
// enter DECSDM
let move_to_decsdm = "\u{1b}[?80h";
vte_parser.feed(&mut grid, move_to_decsdm.as_b... |
rust_dataset_chunk_513756 | rust_dataset.txt | 513,756 | 512 | ,
97,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debug,
... |
rust_dataset_chunk_513757 | rust_dataset.txt | 513,757 | 512 | grid, content.as_bytes());
assert!(grid.pending_messages_to_pty.is_empty());
let forwarded_string: String = grid
.pending_forwarded_queries
.iter()
.map(|q| String::from_utf8(q.to_query_bytes()).unwrap())
.collect();
assert_eq!(forwarded_string, "\u{1b}]11;?\u{1b}\\");
}
#[... |
rust_dataset_chunk_513758 | rust_dataset.txt | 513,758 | 512 | ::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = 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;
let mut gri... |
rust_dataset_chunk_513759 | rust_dataset.txt | 513,759 | 512 | _cell_size,
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
debug,
arrow_fonts,
styled_underlines,
osc8_hyperlinks,
explicitly_disable_kitty_keyboard_protocol,
);
let content = "\u{1b}[?2;1;S\u{1b}\\";
vt... |
rust_dataset_chunk_513760 | rust_dataset.txt | 513,760 | 512 | te_parser.feed(&mut grid, move_to_alternate_screen.as_bytes());
assert!(
matches!(grid.cursor_coordinates(), Some((_, _, false))),
"Cursor still hidden in alternate screen"
);
let show_cursor = "\u{1b}[?25h";
vte_parser.feed(&mut grid, show_cursor.as_bytes());
assert!(
match... |
rust_dataset_chunk_513761 | rust_dataset.txt | 513,761 | 512 | let arrow_fonts = true;
let styled_underlines = true;
let osc8_hyperlinks = true;
let explicitly_disable_kitty_keyboard_protocol = false;
let mut grid = Grid::new(
41,
110,
Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCe... |
rust_dataset_chunk_513762 | rust_dataset.txt | 513,762 | 512 | = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = 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;
let mu... |
rust_dataset_chunk_513763 | rust_dataset.txt | 513,763 | 512 | &content);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
fn nested_list_ui_component_with_coordinates() {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new... |
rust_dataset_chunk_513764 | rust_dataset.txt | 513,764 | 512 | explicitly_disable_kitty_keyboard_protocol,
);
grid.ui_components_enabled = true;
let fixture_name = "text-ui-component";
let content = read_fixture(fixture_name);
vte_parser.feed(&mut grid, &content);
assert_snapshot!(format!("{:?}", grid));
}
#[test]
fn text_ui_component_with_coordinates() {... |
rust_dataset_chunk_513765 | rust_dataset.txt | 513,765 | 512 | vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let debug = false;
let arrow_fonts = true;
let styled_underlines = true;
let osc8_hyperlinks = true;
l... |
rust_dataset_chunk_513766 | rust_dataset.txt | 513,766 | 512 | let mut parse = |s, grid: &mut Grid| {
vte_parser.feed(&mut *grid, &Vec::from(s));
};
// Write text with red background that extends to end of line
// ESC[41m = red background
// ESC[K = clear to end of line (fills with current background)
// ESC[0m = reset
let content = "test\x1b[41m\... |
rust_dataset_chunk_513767 | rust_dataset.txt | 513,767 | 512 | -> Grid {
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
let mut grid = Grid::new(
20,
80,
Rc::new(RefCell::new(Palette::default(... |
rust_dataset_chunk_513768 | rust_dataset.txt | 513,768 | 512 | b]133;C\x07\r\n/tmp\x1b]133;D\x07",
);
let position = viewport_position_of(&grid, "/tmp");
assert_eq!(select_with_click_count(&mut grid, position, 3), "pwd\n/tmp");
}
#[test]
fn osc133_input_marker_survives_ghostty_prompt_clear() {
let mut grid = create_grid_with_content(
"\x1b]133;A;cl=line\x... |
rust_dataset_chunk_513769 | rust_dataset.txt | 513,769 | 512 | = viewport_position_of(&grid, "output");
assert_eq!(
select_with_click_count(&mut grid, position, 3),
"longcmd-output"
);
}
#[test]
fn osc133_running_command_without_end_boundary_falls_back_to_logical_line_selection() {
let mut grid =
create_grid_with_content("\x1b]133;A\x07$ \x1b]... |
rust_dataset_chunk_513770 | rust_dataset.txt | 513,770 | 512 | inct() {
let content = "\x1b]133;A\x07$ \x1b]133;B\x07one\x1b]133;C\x07:1\x1b]133;D\x07\x1b]133;P\x07$ \x1b]133;I\x07two\x1b]133;C\x07:2\x1b]133;D\x07";
let mut first = create_grid_with_content(content);
let mut second = create_grid_with_content(content);
assert_eq!(
select_with_click_count(&mu... |
rust_dataset_chunk_513771 | rust_dataset.txt | 513,771 | 512 | \x1b]133;B\x07cmd\x1b]133;C\x07old\r\x1b[2Kunmarked",
);
assert_eq!(
select_with_click_count(&mut grid, Position::new(0, 6), 3),
"unmarked"
);
}
#[test]
fn osc133_truncated_markers_fall_back_to_logical_line_selection() {
let mut grid = create_grid_with_content(
"\x1b]133;A\x07... |
rust_dataset_chunk_513772 | rust_dataset.txt | 513,772 | 512 | echo hi\x1b]133;C\x07\r\nhi\x1b]133;D;0\x07",
);
grid.set_selection_options(false, DEFAULT_WORD_SEPARATORS);
grid.set_selection_options(true, DEFAULT_WORD_SEPARATORS);
assert_eq!(
select_with_click_count(&mut grid, Position::new(1, 0), 3),
"echo hi\nhi"
);
}
#[test]
fn configured_w... |
rust_dataset_chunk_513773 | rust_dataset.txt | 513,773 | 512 | test]
fn osc133_click_exactly_on_output_marker_column_selects_command_and_output() {
let mut grid = create_grid_with_content(
"\x1b]133;A\x07$ \x1b]133;B\x07cmd\x1b]133;C\x07OUT\x1b]133;D\x07",
);
let position = viewport_position_of(&grid, "OUT");
assert_eq!(select_with_click_count(&mut grid, p... |
rust_dataset_chunk_513774 | rust_dataset.txt | 513,774 | 512 | ::TerminalCharacter| {
!matches!(c.styles.background, Some(AnsiCode::Reset) | None)
};
assert!(!has_background(&row.columns[0]));
assert!(!has_background(&row.columns[1]));
assert!(!has_background(&row.columns[2]));
assert!(has_background(&row.columns[3]));
assert!(has_background(&row.co... |
rust_dataset_chunk_513775 | rust_dataset.txt | 513,775 | 512 | for _ in 0..20 {
grid.add_canonical_line();
}
let line_position = Position::new(5, 15);
grid.start_selection(&line_position);
grid.start_selection(&line_position);
grid.start_selection(&line_position);
let selection_before = grid.get_selected_text();
let line_start = grid.selec... |
rust_dataset_chunk_513776 | rust_dataset.txt | 513,776 | 512 | \nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\n";
let mut grid = create_grid_with_content(content);
for _ in 0..20 {
grid.add_canonical_line();
}
grid.start_selection(&Position::new(5, 5));
grid.update_selection(&... |
rust_dataset_chunk_513777 | rust_dataset.txt | 513,777 | 512 | host
// terminal's bg. The reply uses xterm's canonical
// `rgb:RRRR/GGGG/BBBB` form with each 8-bit channel widened by
// repetition (0x00 → 0x0000, 0x1a → 0x1a1a, 0x3a → 0x3a3a).
let query_bg = b"\x1b]11;?\x07";
vte_parser.feed(&mut grid, query_bg);
assert!(
grid.pending_forwarded_qu... |
rust_dataset_chunk_513778 | rust_dataset.txt | 513,778 | 512 | vte_parser.feed(&mut grid, query_fg);
assert!(
grid.pending_forwarded_queries.is_empty(),
"OSC 10 query must not be forwarded when a pane override is set"
);
assert_eq!(grid.pending_messages_to_pty.len(), 1);
let reply = String::from_utf8(grid.pending_messages_to_pty[0].clone()).unw... |
rust_dataset_chunk_513779 | rust_dataset.txt | 513,779 | 512 | grid.pane_default_fg, None);
assert_eq!(grid.pane_default_bg, None);
}
#[test]
fn osc_11_set_bg_produces_ansi_in_render_output() {
use crate::panes::terminal_character::AnsiCode;
let mut vte_parser = vt_parser::Parser::new();
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
... |
rust_dataset_chunk_513780 | rust_dataset.txt | 513,780 | 512 | ,
underline: bool,
layer: HighlightLayer,
) -> RegexHighlight {
RegexHighlight {
pattern: pattern.to_string(),
style: HighlightStyle::Emphasis0,
layer,
context: BTreeMap::new(),
on_hover,
bold,
italic,
underline,
tooltip_text: None,
... |
rust_dataset_chunk_513781 | rust_dataset.txt | 513,781 | 512 | 1 = vec![create_highlight(
"aaa",
false,
false,
false,
false,
HighlightLayer::Hint,
)];
let h2 = vec![create_highlight(
"bbb",
false,
false,
false,
false,
HighlightLayer::Hint,
)];
grid.set_plugin_regex_highl... |
rust_dataset_chunk_513782 | rust_dataset.txt | 513,782 | 512 | match slot {
None => {}, // acceptable
Some(entries) => assert_eq!(entries.len(), 0),
}
}
#[test]
fn plugin_highlight_at_returns_match() {
let mut grid = create_grid_with_content("hello foo bar\n");
let mut context = BTreeMap::new();
context.insert("key".to_string(), "value".to_stri... |
rust_dataset_chunk_513783 | rust_dataset.txt | 513,783 | 512 | Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
false,
true,
true,
true,
false,
);
// Feed a long string that wraps: "abcdefghij" fills row 0, "klmnopqrst" fills row 1
... |
rust_dataset_chunk_513784 | rust_dataset.txt | 513,784 | 512 | , "b.rs");
assert!(grid.plugin_highlight_at(&Position::new(0, 6)).is_none());
assert_eq!(grid.compute_plugin_highlight_selections().len(), 2);
}
#[test]
fn combined_pattern_highlights_entries_on_wrapped_line() {
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
let terminal_emu... |
rust_dataset_chunk_513785 | rust_dataset.txt | 513,785 | 512 | (0, 8));
// The on_hover entry should exist in plugin_highlights
let entries = grid.plugin_highlights.get(&1).unwrap();
assert_eq!(entries.len(), 1);
assert!(entries[0].1.on_hover);
}
#[test]
fn hover_suppressed_when_mouse_tracking_on() {
let mut grid = create_grid_with_content("hello link_text ba... |
rust_dataset_chunk_513786 | rust_dataset.txt | 513,786 | 512 | (fg, bg): (Option<AnsiCode>, Option<AnsiCode>) =
resolve_highlight_colors(&HighlightStyle::None, &style);
assert!(fg.is_none());
assert!(bg.is_none());
// HighlightStyle::CustomRgb with fg only
let (fg, bg): (Option<AnsiCode>, Option<AnsiCode>) = resolve_highlight_colors(
&HighlightSty... |
rust_dataset_chunk_513787 | rust_dataset.txt | 513,787 | 512 | grid
}
#[test]
fn pane_contents_scrollback_no_truncation_when_max_none() {
let grid = create_grid_with_scrollback();
let result = grid.pane_contents(true, None);
assert_eq!(
result.lines_above_viewport.len(),
21,
"All scrollback lines should be returned when max is None"
);
}
... |
rust_dataset_chunk_513788 | rust_dataset.txt | 513,788 | 512 | new(Palette::default())),
terminal_emulator_color_codes,
Rc::new(RefCell::new(LinkHandler::new())),
Rc::new(RefCell::new(None)),
sixel_image_store,
Rc::new(RefCell::new(KittyImageStore::default())),
Style::default(),
false,
true,
true,
true... |
rust_dataset_chunk_513789 | rust_dataset.txt | 513,789 | 512 | 3,
"Should truncate to 3 scrollback lines"
);
let all_have_ansi = result
.lines_above_viewport
.iter()
.all(|line| line.contains("\x1b["));
assert!(
all_have_ansi,
"All truncated scrollback lines should contain ANSI codes. Lines: {:?}",
result.lines_ab... |
rust_dataset_chunk_513790 | rust_dataset.txt | 513,790 | 512 | BTreeMap::new(),
on_hover: false,
bold: false,
italic: false,
underline: false,
tooltip_text: None,
}];
grid.set_plugin_regex_highlights(1, h1, &Style::default());
grid.set_plugin_regex_highlights(2, h2, &Style::default());
// "foo" starts at column 6
let re... |
rust_dataset_chunk_513791 | rust_dataset.txt | 513,791 | 512 | ".into(),
style: HighlightStyle::Emphasis1,
layer: HighlightLayer::ActionFeedback,
context: BTreeMap::new(),
on_hover: false,
bold: false,
italic: false,
underline: false,
tooltip_text: None,
}];
grid.set_plugin_regex_highlights(1, h1, &Style::defa... |
rust_dataset_chunk_513792 | rust_dataset.txt | 513,792 | 512 | _higher_has_none() {
let mut grid = create_grid_with_content("hello foo bar\n");
let h1 = vec![RegexHighlight {
pattern: "foo".into(),
style: HighlightStyle::Emphasis0,
layer: HighlightLayer::Hint,
context: BTreeMap::new(),
on_hover: true,
bold: false,
ita... |
rust_dataset_chunk_513793 | rust_dataset.txt | 513,793 | 512 | (|c| c.character)
.collect::<String>()
.trim_end()
.to_string()
}
fn scrollback_texts(grid: &Grid) -> Vec<String> {
grid.lines_above.iter().map(|r| row_text(r)).collect()
}
fn viewport_texts(grid: &Grid) -> Vec<String> {
grid.viewport.iter().map(|r| row_text(r)).collect()
}
fn create_... |
rust_dataset_chunk_513794 | rust_dataset.txt | 513,794 | 512 | content);
assert_eq!(scrollback_texts(&grid), vec!["AAA", "BBB"]);
let vp = viewport_texts(&grid);
assert_eq!(vp[0], "CCC");
assert_eq!(vp[1], "DDD");
assert_eq!(vp[6], "III");
assert_eq!(vp[7], "JJJ");
}
#[test]
fn partial_scroll_region_csi_s_transfers_to_scrollback() {
let mut content: V... |
rust_dataset_chunk_513795 | rust_dataset.txt | 513,795 | 512 | .len(), 0);
let vp = viewport_texts(&grid);
assert_eq!(vp[0], "AAA");
assert_eq!(vp[2], "CCC");
assert_eq!(vp[3], "FFF");
assert_eq!(vp[5], "HHH");
assert_eq!(vp[6], "");
assert_eq!(vp[7], "");
}
#[test]
fn partial_scroll_region_does_not_transfer_on_alternate_screen() {
let mut content:... |
rust_dataset_chunk_513796 | rust_dataset.txt | 513,796 | 512 | let start_before = grid.selection.start.line.0;
let end_before = grid.selection.end.line.0;
feed_bytes(&mut grid, b"\x1b[8;1H\r\nnew line");
assert_eq!(grid.selection.start.line.0, start_before - 1);
assert_eq!(grid.selection.end.line.0, end_before - 1);
}
#[test]
fn partial_scroll_region_selection_... |
rust_dataset_chunk_513797 | rust_dataset.txt | 513,797 | 512 | _and_raw(10, 40, &content);
assert_eq!(scrollback_texts(&grid), vec!["AAA", "BBB", "CCC"]);
}
#[test]
fn wrap_at_bottom_of_partial_scroll_region_transfers_to_scrollback() {
// A long line that soft-wraps while the cursor is on the scroll region's
// bottom row must scroll the region, exactly like a newlin... |
rust_dataset_chunk_513798 | rust_dataset.txt | 513,798 | 512 | wraps the cursor must still be on row 7
assert_eq!(
grid.cursor_coordinates().map(|(x, y, _)| (x, y)),
Some((10, 7))
);
}
#[test]
fn wrap_at_bottom_of_nonzero_top_scroll_region_does_not_transfer() {
let mut content: Vec<u8> = Vec::new();
content.extend_from_slice(b"AAA\r\nBBB\r\nCCC\r\... |
rust_dataset_chunk_513799 | rust_dataset.txt | 513,799 | 512 | test]
fn wrap_at_bottom_of_explicit_full_screen_scroll_region_keeps_wrap_flag() {
// CSI 1;10r on a 10-row grid covers the whole screen; wrap behavior must
// be identical to having no region set at all (scroll + wrapped row)
let mut content: Vec<u8> = Vec::new();
content.extend_from_slice(b"\x1b[1;10r"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.