Lines Matching refs:len
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()
124 pub fn cursor_right(&mut self, len: usize) { in cursor_right()
126 if self.cursor < buf.len() { in cursor_right()
129 crossterm::cursor::MoveRight(len.try_into().unwrap()) in cursor_right()
132 self.cursor += len; in cursor_right()
141 let buf_len = self.buf.deref().borrow().len(); in end()
157 let old_buf_len = self.buf.deref().borrow().len(); in change_line()
158 let new_buf_len = new_buf.deref().borrow().len(); in change_line()
182 pub fn len(&self) -> usize { in len() method
183 format!("{}@{}:{}$ ", self.user_name, self.computer_name, self.path).len() in len()