(&mut self, record: UndoRecord)
| 376 | } |
| 377 | |
| 378 | fn push_undo(&mut self, record: UndoRecord) { |
| 379 | if record.inserted.is_empty() && record.deleted.is_empty() { |
| 380 | return; |
| 381 | } |
| 382 | self.redo_stack.clear(); |
| 383 | self.undo_stack.push_back(record); |
| 384 | if self.undo_stack.len() > MAX_UNDO { |
| 385 | self.undo_stack.pop_front(); |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | fn move_previous_word(&mut self) { |
| 390 | let mut idx = self.cursor_char_idx(); |
no test coverage detected