Enable external change tracking
This commit is contained in:
parent
e942e649ed
commit
7830f4107c
4 changed files with 253 additions and 209 deletions
|
|
@ -4,7 +4,7 @@ use modit::{Event, Key, Motion, Parser, TextObject, WordIter};
|
|||
use unicode_segmentation::UnicodeSegmentation;
|
||||
|
||||
use crate::{
|
||||
Action, AttrsList, BorrowedWithFontSystem, Buffer, Color, Cursor, Edit, FontSystem,
|
||||
Action, AttrsList, BorrowedWithFontSystem, Buffer, Change, Color, Cursor, Edit, FontSystem,
|
||||
SyntaxEditor, SyntaxTheme,
|
||||
};
|
||||
|
||||
|
|
@ -230,6 +230,14 @@ impl<'a> Edit for ViEditor<'a> {
|
|||
self.editor.insert_string(data, attrs_list);
|
||||
}
|
||||
|
||||
fn start_change(&mut self) {
|
||||
self.editor.start_change();
|
||||
}
|
||||
|
||||
fn finish_change(&mut self) -> Option<Change> {
|
||||
self.editor.finish_change()
|
||||
}
|
||||
|
||||
fn action(&mut self, font_system: &mut FontSystem, action: Action) {
|
||||
let editor = &mut self.editor;
|
||||
log::info!("Action {:?}", action);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue