aboutsummaryrefslogtreecommitdiff
path: root/crates/text_edit/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/text_edit/src')
-rw-r--r--crates/text_edit/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/text_edit/src/lib.rs b/crates/text_edit/src/lib.rs
index eb3c8caa2..9eef7a890 100644
--- a/crates/text_edit/src/lib.rs
+++ b/crates/text_edit/src/lib.rs
@@ -48,6 +48,10 @@ impl TextEdit {
48 TextEditBuilder::default() 48 TextEditBuilder::default()
49 } 49 }
50 50
51 pub fn into_builder(self) -> TextEditBuilder {
52 TextEditBuilder { indels: self.indels }
53 }
54
51 pub fn insert(offset: TextSize, text: String) -> TextEdit { 55 pub fn insert(offset: TextSize, text: String) -> TextEdit {
52 let mut builder = TextEdit::builder(); 56 let mut builder = TextEdit::builder();
53 builder.insert(offset, text); 57 builder.insert(offset, text);