summaryrefslogtreecommitdiffstats
path: root/src/modes/edit/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes/edit/input.rs')
-rw-r--r--src/modes/edit/input.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modes/edit/input.rs b/src/modes/edit/input.rs
index 032d8de..53b5ff7 100644
--- a/src/modes/edit/input.rs
+++ b/src/modes/edit/input.rs
@@ -93,6 +93,11 @@ impl Input {
.collect();
}
+ pub fn delete_line(&mut self) {
+ self.chars = vec![];
+ self.cursor_index = 0;
+ }
+
/// Replace the content with the new content.
/// Put the cursor at the end.
///