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_2000
rust_dataset.txt
2,000
512
(i)][Column(j)].c = 'a'; } grid[Line(i)][Column(4)].c = '"'; } grid[Line(2)][Column(0)].c = ' '; grid[Line(2)][Column(4)].c = ' '; grid[Line(2)][Column(4)].flags.insert(Flags::WRAPLINE); grid[Line(3)][Column(0)].c = ' '; // Multiple lines contain...
rust_dataset_chunk_2001
rust_dataset.txt
2,001
512
(Selection::new( SelectionType::Semantic, Point { line: Line(0), column: Column(1) }, Side::Left, )); assert_eq!(term.selection_to_string(), Some(String::from("aa"))); } { term.selection = Some(Selection::new( ...
rust_dataset_chunk_2002
rust_dataset.txt
2,002
512
APLINE); grid[Line(3)][Column(4)].c = ' '; term.selection = Some(Selection::new( SelectionType::Block, Point { line: Line(0), column: Column(3) }, Side::Left, )); // The same column. if let Some(s) = term.selection.as_mut() { s.up...
rust_dataset_chunk_2003
rust_dataset.txt
2,003
512
(10, 20); let mut term = Term::new(Config::default(), &size, VoidListener); // Create 10 lines of scrollback. for _ in 0..29 { term.newline(); } // Change the display area. term.scroll_display(Scroll::Top); assert_eq!(term.grid.display_offset(), 10)...
rust_dataset_chunk_2004
rust_dataset.txt
2,004
512
} // Enable vi mode. term.toggle_vi_mode(); // Change the display area and the vi cursor position. term.scroll_display(Scroll::Top); term.vi_mode_cursor.point = Point::new(Line(-5), Column(3)); assert_eq!(term.grid.display_offset(), 10); // Clear the s...
rust_dataset_chunk_2005
rust_dataset.txt
2,005
512
lines. size.screen_lines = 30; term.resize(size); assert_eq!(term.history_size(), 0); assert_eq!(term.grid.cursor.point, Point::new(Line(19), Column(0))); } #[test] fn grow_lines_updates_inactive_cursor_pos() { let mut size = TermSize::new(100, 10); let mut...
rust_dataset_chunk_2006
rust_dataset.txt
2,006
512
))); // Enter alt screen. term.set_private_mode(NamedPrivateMode::SwapScreenAndSetRestoreCursor.into()); // Increase visible lines. size.screen_lines = 5; term.resize(size); // Leave alt screen. term.unset_private_mode(NamedPrivateMode::SwapScreenAndSetRestoreC...
rust_dataset_chunk_2007
rust_dataset.txt
2,007
512
Delta(-2)); term.reset_damage(); term.goto(0, 0); term.goto(1, 0); term.goto(2, 0); let display_offset = term.grid().display_offset(); let mut damaged_lines = match term.damage() { TermDamage::Full => panic!("Expected partial damage, however got Full"), ...
rust_dataset_chunk_2008
rust_dataset.txt
2,008
512
(num_cols); term.move_up(1); assert_eq!(term.damage.lines[5], LineDamageBounds { line: 5, left: 3, right: 3 }); assert_eq!(term.damage.lines[4], LineDamageBounds { line: 4, left: 3, right: 3 }); term.damage.reset(num_cols); term.move_down(1); term.move_down(1); ...
rust_dataset_chunk_2009
rust_dataset.txt
2,009
512
right }); term.save_cursor_position(); term.goto(1, 1); term.damage.reset(num_cols); term.restore_cursor_position(); assert_eq!(term.damage.lines[1], LineDamageBounds { line: 1, left: 1, right: 1 }); assert_eq!(term.damage.lines[7], LineDamageBounds { line: 7, left: 8, ...
rust_dataset_chunk_2010
rust_dataset.txt
2,010
512
.damage.full); term.reset_damage(); term.deccolm(); assert!(term.damage.full); term.reset_damage(); term.decaln(); assert!(term.damage.full); term.reset_damage(); term.set_mode(NamedMode::Insert.into()); // Just setting `Insert` mode shouldn't m...
rust_dataset_chunk_2011
rust_dataset.txt
2,011
512
())); assert!(term.title_stack.is_empty()); // Title stack doesn't grow infinitely. for _ in 0..4097 { term.push_title(); } assert_eq!(term.title_stack.len(), 4096); // Title and title stack reset when terminal state is reset. term.push_title(); ...
rust_dataset_chunk_2012
rust_dataset.txt
2,012
512
')]; pub type Match = RangeInclusive<Point>; /// Terminal regex search state. #[derive(Clone, Debug)] pub struct RegexSearch { left_fdfa: LazyDfa, left_rdfa: LazyDfa, right_rdfa: LazyDfa, right_fdfa: LazyDfa, } impl RegexSearch { /// Build the forward and backward search DFAs. pub fn new(sear...
rust_dataset_chunk_2013
rust_dataset.txt
2,013
512
cache: Cache, direction: Direction, match_all: bool, } impl LazyDfa { fn new( search: &str, mut config: Config, syntax: SyntaxConfig, mut thompson: ThompsonConfig, direction: Direction, match_all: bool, ) -> Result<Self, Box<BuildError>> { thomps...
rust_dataset_chunk_2014
rust_dataset.txt
2,014
512
there's any match at all. let first_match = regex_iter.peek()?.clone(); let regex_match = regex_iter .find(|regex_match| { let match_point = Self::match_side(regex_match, side); // If the match's point is beyond the origin, we're done. match...
rust_dataset_chunk_2015
rust_dataset.txt
2,015
512
) -> Option<Match> { // Find start and end of match. let match_start = self.regex_search(start, end, &mut regex.left_fdfa)?; let match_end = self.regex_search(match_start, start, &mut regex.left_rdfa)?; Some(match_start..=match_end) } /// Find the next regex match to the ri...
rust_dataset_chunk_2016
rust_dataset.txt
2,016
512
let mut iter = self.grid.iter_from(start); let mut regex_match = None; let mut done = false; let mut cell = iter.cell(); self.skip_fullwidth(&mut iter, &mut cell, regex.direction); let mut c = cell.c; let mut last_wrapped = iter.cell().flags.contains(Flags::WRAPLINE); ...
rust_dataset_chunk_2017
rust_dataset.txt
2,017
512
state indicating the first character isn't part of the // match. reset_state!(); // Retry this character if first byte caused failure. // // After finding an empty match, we want to advance the sear...
rust_dataset_chunk_2018
rust_dataset.txt
2,018
512
regex.dfa.next_eoi_state(&mut regex.cache, state)?; if state.is_match() { regex_match = Some(last_point); } match regex_match { // Stop if we found a non-empty match before the linebreak. Some(_) if (!state.is_...
rust_dataset_chunk_2019
rust_dataset.txt
2,019
512
} })?; let mut iter = self.grid.iter_from(point); // For every character match that equals the starting bracket, we // ignore one bracket of the opposite type. let mut skip_pairs = 0; loop { // Check the next cell let cell = if forward { iter.n...
rust_dataset_chunk_2020
rust_dataset.txt
2,020
512
Flags::LEADING_WIDE_CHAR_SPACER; while let Some(cell) = iter.prev() { if cell.point.column == last_column && !cell.flags.contains(Flags::WRAPLINE) { break; } point = cell.point; if !cell.flags.intersects(wide_spacer) && needles.contains(cell.c) ...
rust_dataset_chunk_2021
rust_dataset.txt
2,021
512
{ point: Point, end: Point, direction: Direction, regex: &'a mut RegexSearch, term: &'a Term<T>, done: bool, } impl<'a, T> RegexIter<'a, T> { pub fn new( start: Point, end: Point, direction: Direction, term: &'a Term<T>, regex: &'a mut RegexSearch, ...
rust_dataset_chunk_2022
rust_dataset.txt
2,022
512
\r\n\ Alacritty\r\n\ 123\ "); // Check regex across wrapped and unwrapped lines. let mut regex = RegexSearch::new("Ala.*123").unwrap(); let start = Point::new(Line(1), Column(0)); let end = Point::new(Line(4), Column(2)); let match_start = Point::...
rust_dataset_chunk_2023
rust_dataset.txt
2,023
512
} #[test] fn no_match_right() { #[rustfmt::skip] let term = mock_term("\ first line\n\ broken second\r\n\ third\ "); let mut regex = RegexSearch::new("nothing").unwrap(); let start = Point::new(Line(0), Column(0)); let end = ...
rust_dataset_chunk_2024
rust_dataset.txt
2,024
512
fn skip_dead_cell() { let term = mock_term("alacritty"); // Make sure dead state cell is skipped when reversing. let mut regex = RegexSearch::new("alacrit").unwrap(); let start = Point::new(Line(0), Column(0)); let end = Point::new(Line(0), Column(6)); assert_eq!(ter...
rust_dataset_chunk_2025
rust_dataset.txt
2,025
512
Some(start..=match_end)); } #[test] fn fullwidth() { let term = mock_term("a🦇x🦇"); let mut regex = RegexSearch::new("[^ ]*").unwrap(); let start = Point::new(Line(0), Column(0)); let end = Point::new(Line(0), Column(5)); assert_eq!(term.regex_search_right(&mut re...
rust_dataset_chunk_2026
rust_dataset.txt
2,026
512
assert_eq!(term.regex_search_right(&mut regex, start, end), Some(start..=match_end)); } #[test] fn wrapping() { #[rustfmt::skip] let term = mock_term("\ xxx\r\n\ xxx\ "); let mut regex = RegexSearch::new("xxx").unwrap(); let start = P...
rust_dataset_chunk_2027
rust_dataset.txt
2,027
512
"); const PATTERN: &str = "[a-z]*"; let mut regex = RegexSearch::new(PATTERN).unwrap(); let start = Point::new(Line(0), Column(0)); let end = Point::new(Line(0), Column(3)); let match_start = Point::new(Line(0), Column(0)); assert_eq!(term.regex_search_right(&mut regex,...
rust_dataset_chunk_2028
rust_dataset.txt
2,028
512
(Line(0), Column(3)); let end = Point::new(Line(1), Column(2)); let match_start = Point::new(Line(1), Column(0)); let match_end = Point::new(Line(1), Column(2)); assert_eq!(term.regex_search_right(&mut regex, start, end), Some(match_start..=match_end)); } #[test] fn leading_...
rust_dataset_chunk_2029
rust_dataset.txt
2,029
512
(0), Column(2)); let match_end = Point::new(Line(1), Column(1)); assert_eq!(term.regex_search_left(&mut regex, start, end), Some(match_start..=match_end)); } #[test] fn wide_without_spacer() { let size = TermSize::new(2, 2); let mut term = Term::new(Config::default(), &size,...
rust_dataset_chunk_2030
rust_dataset.txt
2,030
512
()); } #[test] fn runtime_cache_error() { let term = mock_term(&str::repeat("i", 9999)); let mut regex = RegexSearch::new("[0-9A-Za-z]{9999}").unwrap(); let start = Point::new(Line(0), Column(0)); let end = Point::new(Line(0), Column(9999)); assert_eq!(term.regex_se...
rust_dataset_chunk_2031
rust_dataset.txt
2,031
512
(2))); } #[test] fn inline_word_search() { #[rustfmt::skip] let term = mock_term("\ word word word word w\n\ ord word word word\ "); let mut regex = RegexSearch::new("word").unwrap(); let start = Point::new(Line(1), Column(4)); let en...
rust_dataset_chunk_2032
rust_dataset.txt
2,032
512
#[test] fn fullwidth_into_halfwidth_across_lines() { let term = mock_term("a🦇\nxab"); let mut regex = RegexSearch::new("🦇x").unwrap(); let start = Point::new(Line(0), Column(0)); let end = Point::new(Line(1), Column(2)); let match_start = Point::new(Line(0), Column(1)); ...
rust_dataset_chunk_2033
rust_dataset.txt
2,033
512
use std::thread::{Builder, JoinHandle}; /// Like `thread::spawn`, but with a `name` argument. pub fn spawn_named<F, T, S>(name: S, f: F) -> JoinHandle<T> where F: FnOnce() -> T + Send + 'static, T: Send + 'static, S: Into<String>, { Builder::new().name(name.into()).spawn(f).expect("thread spawn works")...
rust_dataset_chunk_2034
rust_dataset.txt
2,034
512
Reader: io::Read; type Writer: io::Write; /// # Safety /// /// The underlying sources must outlive their registration in the `Poller`. unsafe fn register(&mut self, _: &Arc<Poller>, _: Event, _: PollMode) -> io::Result<()>; fn reregister(&mut self, _: &Arc<Poller>, _: Event, _: PollMode) -> io...
rust_dataset_chunk_2035
rust_dataset.txt
2,035
512
.chars().next().unwrap_or_default() as usize); // Return true if the terminfo file exists at the specified location. macro_rules! check_path { ($path:expr) => { if $path.join(first).join(terminfo).exists() || $path.join(&first_hex).join(terminfo).exists() { ...
rust_dataset_chunk_2036
rust_dataset.txt
2,036
512
PollMode, Poller}; use rustix_openpty::openpty; use rustix_openpty::rustix::termios::Winsize; #[cfg(any(target_os = "linux", target_os = "macos"))] use rustix_openpty::rustix::termios::{self, InputModes, OptionalActions}; use signal_hook::low_level::{pipe as signal_pipe, unregister as unregister_signal}; use signal_ho...
rust_dataset_chunk_2037
rust_dataset.txt
2,037
512
libc::getuid() }; let status = unsafe { libc::getpwuid_r(uid, entry.as_mut_ptr(), buf.as_mut_ptr() as *mut _, buf.len(), &mut res) }; let entry = unsafe { entry.assume_init() }; if status < 0 { return Err(Error::other("getpwuid_r failed")); } if res.is_null() { return ...
rust_dataset_chunk_2038
rust_dataset.txt
2,038
512
}; Ok(Self { user, home, shell }) } } #[cfg(not(target_os = "macos"))] fn default_shell_command(shell: &str, _user: &str, _home: &str) -> Command { Command::new(shell) } #[cfg(target_os = "macos")] fn default_shell_command(shell: &str, user: &str, home: &str) -> Command { let shell_name =...
rust_dataset_chunk_2039
rust_dataset.txt
2,039
512
TTY from a PTY's file descriptors. pub fn from_fd(config: &Options, window_id: u64, master: OwnedFd, slave: OwnedFd) -> Result<Pty> { let master_fd = master.as_raw_fd(); let slave_fd = slave.as_raw_fd(); #[cfg(any(target_os = "linux", target_os = "macos"))] if let Ok(mut termios) = termios::tcgetattr(...
rust_dataset_chunk_2040
rust_dataset.txt
2,040
512
_terminal(slave_fd)?; // No longer need slave/master fds. libc::close(slave_fd); libc::close(master_fd); libc::signal(libc::SIGCHLD, libc::SIG_DFL); libc::signal(libc::SIGHUP, libc::SIG_DFL); libc::signal(libc::SIGINT, libc::SIG_DFL); ...
rust_dataset_chunk_2041
rust_dataset.txt
2,041
512
Event::readable(PTY_CHILD_EVENT_TOKEN), PollMode::Level, ) } } #[inline] fn reregister( &mut self, poll: &Arc<Poller>, mut interest: Event, poll_opts: PollMode, ) -> Result<()> { interest.key = PTY_READ_WRITE_TO...
rust_dataset_chunk_2042
rust_dataset.txt
2,042
512
trait ToWinsize { /// Get a `Winsize`. fn to_winsize(self) -> Winsize; } impl ToWinsize for WindowSize { fn to_winsize(self) -> Winsize { let ws_row = self.num_lines as libc::c_ushort; let ws_col = self.num_cols as libc::c_ushort; let ws_xpixel = ws_col * self.cell_width as libc::...
rust_dataset_chunk_2043
rust_dataset.txt
2,043
512
. pipe: Reader, /// Is this the first time registering? first_register: bool, /// We logically own the reader, but we don't actually use it. _reader: PhantomData<R>, } impl<R: Read + Send + 'static> UnblockedReader<R> { /// Spawn a new unblocked reader. pub fn new(mut source: R, pipe_capa...
rust_dataset_chunk_2044
rust_dataset.txt
2,044
512
self.first_register = false; poller.post(CompletionPacket::new(event)).ok(); } } /// Deregister interest in the reader. pub fn deregister(&self) { let mut interest = self.interest.interest.lock().unwrap(); *interest = None; } /// Try to read from the reader. ...
rust_dataset_chunk_2045
rust_dataset.txt
2,045
512
Poll::Ready(Err(e)) if e.kind() == io::ErrorKind::Interrupted => { // We were interrupted; continue. continue; }, Poll::Ready(Err(e)) => { log::error!("error writing to pipe: {}", e); ...
rust_dataset_chunk_2046
rust_dataset.txt
2,046
512
_by_ref(self: &Arc<Self>) { let mut interest_lock = self.interest.lock().unwrap(); if let Some(interest) = interest_lock.as_ref() { // Send the event to the poller. let send_event = match self.end { PipeEnd::Reader => interest.event.readable, PipeE...
rust_dataset_chunk_2047
rust_dataset.txt
2,047
512
mut exit_code) }; let exit_status = if status == FALSE { None } else { Some(ExitStatus::from_raw(exit_code)) }; event_tx.sender.send(ChildEvent::Exited(exit_status)).ok(); let interest = event_tx.interest.lock().unwrap(); if let Some(interest) = interest.as_ref() { interest.poller.post(Completi...
rust_dataset_chunk_2048
rust_dataset.txt
2,048
512
of the raw handle to you, /// and the handle is only guaranteed to be valid while the hosted application /// has not yet been destroyed. /// /// If you terminate the process using this handle, the terminal will get a /// timeout error, and the child watcher will emit an `Exited` event. pub fn r...
rust_dataset_chunk_2049
rust_dataset.txt
2,049
512
Result}; use std::os::windows::ffi::OsStrExt; use std::os::windows::io::IntoRawHandle; use std::{mem, ptr}; use windows_sys::Win32::Foundation::{HANDLE, S_OK}; use windows_sys::Win32::System::Console::{ COORD, ClosePseudoConsole, CreatePseudoConsole, HPCON, ResizePseudoConsole, }; use windows_sys::Win32::System::...
rust_dataset_chunk_2050
rust_dataset.txt
2,050
512
"); conpty }, None => { // Cannot load conpty.dll - use the standard Windows API. info!("Using Windows API for pseudoconsole"); Self { create: CreatePseudoConsole, resize: ResizePseudoConsole,...
rust_dataset_chunk_2051
rust_dataset.txt
2,051
512
miow::pipe::anonymous(0)?; let (conin_pty_handle, conin) = miow::pipe::anonymous(0)?; // Create the Pseudo Console, using the pipes. let result = unsafe { (api.create)( window_size.into(), conin_pty_handle.into_raw_handle() as HANDLE, conout_pty_handle.into_raw_...
rust_dataset_chunk_2052
rust_dataset.txt
2,052
512
0; if !success { return Err(Error::last_os_error()); } } // Set thread attribute list's Pseudo Console to the specified ConPTY. unsafe { success = UpdateProcThreadAttribute( startup_info_ex.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PS...
rust_dataset_chunk_2053
rust_dataset.txt
2,053
512
learn.microsoft.com/en-us/previous-versions/troubleshoot/windows/win32/createprocess-cannot-eliminate-duplicate-variables#environment-variables fn convert_custom_env(custom_env: &HashMap<String, String>) -> Option<Vec<u16>> { // Windows inherits parent's env when no `lpEnvironment` parameter is specified. if cu...
rust_dataset_chunk_2054
rust_dataset.txt
2,054
512
fn from(window_size: WindowSize) -> Self { let lines = window_size.num_lines; let columns = window_size.num_cols; COORD { X: columns as i16, Y: lines as i16 } } } --- FILE: alacritty/alacritty_terminal/src/tty/windows/mod.rs --- use std::ffi::OsStr; use std::io::{self, Result}; use std::i...
rust_dataset_chunk_2055
rust_dataset.txt
2,055
512
ReadWrite for Pty { type Reader = ReadPipe; type Writer = WritePipe; #[inline] unsafe fn register( &mut self, poll: &Arc<Poller>, interest: polling::Event, poll_opts: polling::PollMode, ) -> io::Result<()> { self.conin.register(poll, with_key(interest, PTY_RE...
rust_dataset_chunk_2056
rust_dataset.txt
2,056
512
/std/src/sys/args/windows.rs#L174 fn push_escaped_arg(cmd: &mut String, arg: &str) { let arg_bytes = arg.as_bytes(); let quote = arg_bytes.iter().any(|c| *c == b' ' || *c == b'\t') || arg_bytes.is_empty(); if quote { cmd.push('"'); } let mut backslashes: usize = 0; for x in arg.chars() ...
rust_dataset_chunk_2057
rust_dataset.txt
2,057
512
// Cases with backslashes only (no spaces, no quotes) - no quotes added ("ab\\c", "ab\\c"), // Cases with quotes only (no spaces) - quotes escaped but no outer quotes ("ab\"c", "ab\\\"c"), ("\"", "\\\""), ("a\"b\"c", "a\\\"b\\\"c"), // ...
rust_dataset_chunk_2058
rust_dataset.txt
2,058
512
motion movements. #[derive(Debug, Copy, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(rename_all = "lowercase"))] pub enum ViMotion { /// Move up. Up, /// Move down. Down, /// Move left. Left, /// Move right. Right, /// First column, or b...
rust_dataset_chunk_2059
rust_dataset.txt
2,059
512
self.point.line += 1; } }, ViMotion::Left => { self.point = term.expand_wide(self.point, Direction::Left); let wrap_point = Point::new(self.point.line - 1, term.last_column()); if self.point.column == 0 && self....
rust_dataset_chunk_2060
rust_dataset.txt
2,060
512
}, ViMotion::SemanticLeft => { self.point = semantic(term, self.point, Direction::Left, Side::Left); }, ViMotion::SemanticRight => { self.point = semantic(term, self.point, Direction::Right, Side::Left); }, ViMotion:...
rust_dataset_chunk_2061
rust_dataset.txt
2,061
512
#[must_use = "this returns the result of the operation, without modifying the original"] pub fn scroll<T: EventListener>(mut self, term: &Term<T>, lines: i32) -> Self { // Clamp movement to within visible region. let line = (self.point.line - lines).grid_clamp(term, Boundary::Grid); // ...
rust_dataset_chunk_2062
rust_dataset.txt
2,062
512
break; } occupied = first_occupied_in_line(term, line).or(occupied); } // Fallback to the next non-empty cell. let mut line = point.line; occupied.unwrap_or_else(|| { loop { if let Some(occupied) = first_occupied_in_li...
rust_dataset_chunk_2063
rust_dataset.txt
2,063
512
by whitespace separated word, like W/B/E/gE in vi. fn word<T: EventListener>( term: &Term<T>, mut point: Point, direction: Direction, side: Side, ) -> Point { // Make sure we jump above wide chars. point = term.expand_wide(point, direction); if direction == side { // Skip whitespac...
rust_dataset_chunk_2064
rust_dataset.txt
2,064
512
. fn is_space<T>(term: &Term<T>, point: Point) -> bool { let cell = &term.grid()[point.line][point.column]; !cell.flags().intersects(Flags::WIDE_CHAR_SPACER | Flags::LEADING_WIDE_CHAR_SPACER) && (cell.c == ' ' || cell.c == '\t') } /// Check if the cell at a point contains the WRAPLINE flag. fn is_wrap<...
rust_dataset_chunk_2065
rust_dataset.txt
2,065
512
c = 'a'; term.grid_mut()[Line(0)][Column(1)].c = '汉'; term.grid_mut()[Line(0)][Column(1)].flags.insert(Flags::WIDE_CHAR); term.grid_mut()[Line(0)][Column(2)].c = ' '; term.grid_mut()[Line(0)][Column(2)].flags.insert(Flags::WIDE_CHAR_SPACER); term.grid_mut()[Line(0)][Column(3)].c ...
rust_dataset_chunk_2066
rust_dataset.txt
2,066
512
.motion(&mut term, ViMotion::FirstOccupied); assert_eq!(cursor.point, Point::new(Line(2), Column(0))); cursor = cursor.motion(&mut term, ViMotion::FirstOccupied); assert_eq!(cursor.point, Point::new(Line(0), Column(1))); } #[test] fn motion_high_middle_low() { let mut term ...
rust_dataset_chunk_2067
rust_dataset.txt
2,067
512
Column(7)].c = ' '; term.grid_mut()[Line(0)][Column(8)].c = 'x'; term.grid_mut()[Line(0)][Column(9)].c = ':'; term.grid_mut()[Line(0)][Column(10)].c = 'x'; term.grid_mut()[Line(0)][Column(11)].c = ' '; term.grid_mut()[Line(0)][Column(12)].c = ' '; term.grid_mut()[Line(0)]...
rust_dataset_chunk_2068
rust_dataset.txt
2,068
512
))); cursor = cursor.motion(&mut term, ViMotion::SemanticLeft); assert_eq!(cursor.point, Point::new(Line(0), Column(10))); cursor = cursor.motion(&mut term, ViMotion::SemanticLeft); assert_eq!(cursor.point, Point::new(Line(0), Column(9))); cursor = cursor.motion(&mut term, ViM...
rust_dataset_chunk_2069
rust_dataset.txt
2,069
512
::new(Line(0), Column(15))); cursor = cursor.motion(&mut term, ViMotion::SemanticLeftEnd); assert_eq!(cursor.point, Point::new(Line(0), Column(13))); cursor = cursor.motion(&mut term, ViMotion::SemanticLeftEnd); assert_eq!(cursor.point, Point::new(Line(0), Column(10))); cursor...
rust_dataset_chunk_2070
rust_dataset.txt
2,070
512
term(); term.grid_mut()[Line(0)][Column(0)].c = 'a'; term.grid_mut()[Line(0)][Column(1)].c = ' '; term.grid_mut()[Line(0)][Column(2)].c = '汉'; term.grid_mut()[Line(0)][Column(2)].flags.insert(Flags::WIDE_CHAR); term.grid_mut()[Line(0)][Column(3)].c = ' '; term.grid_mut()...
rust_dataset_chunk_2071
rust_dataset.txt
2,071
512
cursor.motion(&mut term, ViMotion::WordLeft); assert_eq!(cursor.point, Point::new(Line(0), Column(0))); cursor = cursor.motion(&mut term, ViMotion::WordRight); assert_eq!(cursor.point, Point::new(Line(0), Column(4))); cursor = cursor.motion(&mut term, ViMotion::WordLeftEnd); a...
rust_dataset_chunk_2072
rust_dataset.txt
2,072
512
'a'; let mut cursor = ViModeCursor::new(Point::new(Line(0), Column(2))); cursor = cursor.motion(&mut term, ViMotion::WordRight); assert_eq!(cursor.point, Point::new(Line(0), Column(5))); let mut cursor = ViModeCursor::new(Point::new(Line(0), Column(3))); cursor = cursor.motion...
rust_dataset_chunk_2073
rust_dataset.txt
2,073
512
0))); cursor = cursor.scroll(&term, -20); assert_eq!(cursor.point, Point::new(Line(-20), Column(0))); cursor = cursor.scroll(&term, -20); assert_eq!(cursor.point, Point::new(Line(0), Column(0))); cursor = cursor.scroll(&term, -20); assert_eq!(cursor.point, Point::new(L...
rust_dataset_chunk_2074
rust_dataset.txt
2,074
512
Motion::SemanticLeft); assert_eq!(cursor.point, Point::new(Line(0), Column(2))); let mut cursor = ViModeCursor::new(Point::new(Line(0), Column(2))); cursor = cursor.motion(&mut term, ViMotion::SemanticLeft); assert_eq!(cursor.point, Point::new(Line(0), Column(0))); } } --- FILE: a...
rust_dataset_chunk_2075
rust_dataset.txt
2,075
512
vttest_tab_clear_set wrapline_alt_toggle zerowidth zsh_tab_completion erase_in_line scroll_in_region_up_preserves_history origin_goto } fn read_u8<P>(path: P) -> Vec<u8> where P: AsRef<Path>, { let mut res = Vec::new(); File::open(path.as_ref()).unwrap().read_to_end(&mut res).u...
rust_dataset_chunk_2076
rust_dataset.txt
2,076
512
/alacritty/Cargo.toml --- [package] name = "alacritty" version = "0.18.0-dev" authors = ["Christian Duerr <contact@christianduerr.com>", "Joe Wilm <joe@jwilm.com>"] license = "Apache-2.0" description = "A fast, cross-platform, OpenGL terminal emulator" readme = "README.md" homepage = "https://alacritty.org" repository ...
rust_dataset_chunk_2077
rust_dataset.txt
2,077
512
_generator = "0.14.0" [dev-dependencies] clap_complete = "4.2.3" [target.'cfg(not(windows))'.dependencies] xdg = "3.0.0" [target.'cfg(not(target_os = "macos"))'.dependencies] png = { version = "0.17.5", default-features = false, optional = true } [target.'cfg(target_os = "macos")'.dependencies] objc2 = "0.6.1" objc...
rust_dataset_chunk_2078
rust_dataset.txt
2,078
512
-version.workspace = true [dependencies] log = { version = "0.4.17", features = ["serde"] } serde = "1.0.163" toml.workspace = true [dev-dependencies] alacritty_config_derive = { version = "0.2.6-dev", path = "../alacritty_config_derive" } serde = { version = "1.0.163", features = ["derive"] } --- FILE: alacritty/a...
rust_dataset_chunk_2079
rust_dataset.txt
2,079
512
vec = { version = "0.7.2", features = ["serde"] } base64 = "0.22.0" bitflags = "2.4.1" log = "0.4" parking_lot = "0.12.0" regex-automata = "0.4.3" unicode-width = "0.2.0" vte = { version = "0.15.0", default-features = false, features = ["std", "ansi"] } serde = { version = "1", features = ["derive", "rc"], optional = t...
rust_dataset_chunk_2080
rust_dataset.txt
2,080
512
ab2163cf0bd0db607e827a5214571990307866" } --- FILE: alacritty/rustfmt.toml --- format_code_in_doc_comments = true match_block_trailing_comma = true condense_wildcard_suffixes = true use_field_init_shorthand = true normalize_doc_attributes = true overflow_delimited_expr = true imports_granularity = "Module" use_small_...
rust_dataset_chunk_2081
rust_dataset.txt
2,081
512
_ID` in the main process - FD leaks when closing PTYs on Unix - Crash when ConPTY creation failed ## 0.24.0 ### Added - `tty::unix::from_fd()` to create a TTY from a pre-opened PTY's file-descriptors ### Changed - **`Term` is not focused by default anymore** --- FILE: alacritty/alacritty/windows/wix/license.rtf ...
rust_dataset_chunk_2082
rust_dataset.txt
2,082
512
not limited to compiled object code, generated documentation, and conversions to other media types.\par "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided...
rust_dataset_chunk_2083
rust_dataset.txt
2,083
512
patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which suc...
rust_dataset_chunk_2084
rust_dataset.txt
2,084
512
any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\par 5. Submission of Contributions.\par Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to ...
rust_dataset_chunk_2085
rust_dataset.txt
2,085
512
agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.\par END OF TERMS AND CONDITIONS\par \par APPENDIX: How to apply the Apache License to your work.\par \par ...
rust_dataset_chunk_2086
rust_dataset.txt
2,086
512
- Spurious "Failed to set new owner of XCB selection" warnings on X11 - Lacking permissions to launch software sending Apple events - Off-by-one in vi mode ParagraphUp action - Unbounded per-cell memory usage for zero-width cells - Unbounded Kitty keyboard mode stack size - Keyboard and mouse bindings missing from `a...
rust_dataset_chunk_2087
rust_dataset.txt
2,087
512
` in kitty keyboard's disambiguate mode - Hint bindings not respecting IPC overrides - Search matching a wrapping fullwidth character in the last column - Crash when `AppleFontSmoothing` option is not present on macOS - Origin mode (DECOM) not moving cursor to the origin point - Unresponsiveness when spamming the bell ...
rust_dataset_chunk_2088
rust_dataset.txt
2,088
512
`ESC` like for ASCII input - Decorations use opaque style and system window background on macOS - No longer source `~/.zshenv` on macOS - Moved config options `import`, `working_directory`, `live_config_reload`, and `ipc_socket` to the new `general` section - Moved config option `shell` to `terminal.shell` - `ctrl...
rust_dataset_chunk_2089
rust_dataset.txt
2,089
512
Wayland when cursor theme uses legacy cursor icon names - Config keys are available under proper names - Build failure when compiling with x11 feature on NetBSD - Hint `Select` action selecting the entire line for URL escapes - Kitty encoding used for regular keys when they don't carry text ### Changed - No unused-k...
rust_dataset_chunk_2090
rust_dataset.txt
2,090
512
egl` to prioritize EGL over other display APIs - Inline vi-mode search using `f`/`F`/`t`/`T` - `window.blur` config option to request blur for transparent windows - `--option` argument for `alacritty msg create-window` - Support for `DECRQM`/`DECRPM` escape sequences - Support for kitty's keyboard protocol ### Changed...
rust_dataset_chunk_2091
rust_dataset.txt
2,091
512
Default Vi key bindings for `Last`/`First` actions not working on X11/Wayland - Cut off wide characters in preedit string - Scrolling on touchscreens - Double clicking on CSD titlebar not always maximizing a window on Wayland - Excessive memory usage when using regexes with a large number of possible states - `window....
rust_dataset_chunk_2092
rust_dataset.txt
2,092
512
when using old mesa platforms ## 0.12.0 ### Added - Uppercase `-T` short form for `--title` - Support for horizontal scrolling in mouse mode and alternative scrolling modes - Support for fractional scaling on Wayland with wp-fractional-scale protocol - Support for running on GLES context - Touchscreen input for cli...
rust_dataset_chunk_2093
rust_dataset.txt
2,093
512
config field; use `window.decorations_theme_variant` instead - `alt_send_esc` is now always set to `true` ## 0.11.0 ### Packaging - Minimum Rust version has been bumped to 1.60.0 ## 0.11.0 ### Packaging - Minimum Rust version has been bumped to 1.57.0 - Renamed `io.alacritty.Alacritty.appdata.xml` to `org.alacri...
rust_dataset_chunk_2094
rust_dataset.txt
2,094
512
should have proper text rendering now on Wayland - Config option `window.gtk_theme_variant`, you should use `window.decorations_theme_variant` instead - `--class` now sets both class part of WM_CLASS property and instance - `--class`'s `general` and `instance` options were swapped - Search bar is now respecting cursor...
rust_dataset_chunk_2095
rust_dataset.txt
2,095
512
disable the built-in font for drawing box characters ### Changed - Builtin font thickness is now based on cell width instead of underline thickness ### Fixed - OSC 4 not handling `?` - `?` in OSC strings reporting default colors instead of modified ones - OSC 104 not clearing colors when second parameter is empty ...
rust_dataset_chunk_2096
rust_dataset.txt
2,096
512
- Wayland client side decorations were simplified ## 0.9.0 ### Packaging - Minimum Rust version has been bumped to 1.46.0 ### Added - Support for `ipfs`/`ipns` URLs - Mode field for regex hint bindings ### Fixed - Regression in rendering performance with dense grids since 0.6.0 - Crash/Freezes with partially v...
rust_dataset_chunk_2097
rust_dataset.txt
2,097
512
on Windows incorrectly opens File Explorer - Incorrect underline cursor thickness on wide cell - Viewport moving around when resizing while scrolled into history - Block cursor not expanding across fullwidth characters when on the right side of it - Overwriting fullwidth characters only clearing one of the involved ce...
rust_dataset_chunk_2098
rust_dataset.txt
2,098
512
- Cursor position not reported to apps when mouse is moved with button held outside of window - No live config update when starting Alacritty with a broken configuration file - PTY not drained to the end with the `--hold` flag enabled - High CPU usage on BSD with live config reload enabled - Alacritty not discarding in...
rust_dataset_chunk_2099
rust_dataset.txt
2,099
512
on Wayland's client side decorations will show application menu - Escape sequences to enable and disable window urgency hints (`CSI ? 1042 h`, `CSI ? 1042 l`) ### Changed - Cursors are now inverted when their fixed color is similar to the cell's background - Use the working directory of the terminal foreground proce...