MCPcopy Create free account
hub / github.com/Eeive/Evcode-ide / push_undo

Method push_undo

src/editor/buffer.rs:378–387  ·  view source on GitHub ↗
(&mut self, record: UndoRecord)

Source from the content-addressed store, hash-verified

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();

Callers 7

insert_charMethod · 0.80
insert_strMethod · 0.80
insert_lineMethod · 0.80
delete_lineMethod · 0.80
delete_char_forwardMethod · 0.80
delete_char_backwardMethod · 0.80
delete_selectionMethod · 0.80

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected