Searched refs:len (Results 1 – 5 of 5) sorted by relevance
52 let len_to_end = self.buf.deref().borrow().len() - self.cursor; in insert()72 self.cursor += bytes.len(); in insert()78 pub fn delete(&mut self, len: usize) { in delete()80 let buf_len = self.buf.deref().borrow().len(); in delete()83 if cursor + len - 1 < buf_len { in delete()85 self.buf.deref().borrow_mut().drain(cursor..cursor + len); in delete()94 print!("{}", " ".repeat(len)); in delete()113 pub fn cursor_left(&mut self, len: usize) { in cursor_left()117 crossterm::cursor::MoveLeft(len.try_into().unwrap()) in cursor_left()120 self.cursor -= len; in cursor_left()[all …]
209 if *command_index < self.history_commands.len() - 1 { in handle_funckey()223 if self.printer.cursor < self.printer.buf.borrow().len() { in handle_funckey()242 let mut command_index = self.history_commands.len() - 1; in readline()265 if buf.len() == 0 || buf.iter().all(|byte| *byte == b' ') { in readline()271 let mut stack: String = String::with_capacity(str.len()); in readline()310 let (prefix, candidates) = if fragments.len() < 2 { in readline()318 match candidates.len() { in readline()322 self.printer.cursor_left(old_fragment.len()); in readline()323 self.printer.delete(old_fragment.len()); in readline()
58 let path = match args.len() { in shell_cmd_cd()150 if args.len() == 0 { in shell_cmd_reboot()159 if args.len() == 1 && args.get(0).unwrap() != "-m" { in shell_cmd_free()200 if args.len() == 0 { in shell_cmd_free()226 if args.len() == 0 { in shell_cmd_help()234 if args.len() == 1 { in shell_cmd_export()237 if pair.len() == 2 && !pair.contains(&"") { in shell_cmd_export()
63 match value.len() { in should_read_more()
145 tokens.push(Token::Word(token_str[1..token_str.len() - 1].to_string())); in lexer()