summaryrefslogtreecommitdiffstats
path: root/src/modes/edit/input.rs
diff options
context:
space:
mode:
authorqkzk <qkzk@users.noreply.github.com>2024-03-06 17:37:43 +0100
committerGitHub <noreply@github.com>2024-03-06 17:37:43 +0100
commit09a4135c804f28ded45e38bcb6f6dd21f30416f9 (patch)
treecb5607f749320964a422ce512996d923b44be5a6 /src/modes/edit/input.rs
parent0c669840cac86bdf59074d643d56a6ff3554c3cd (diff)
parent809448520c282f30d748e02499ddb13915e9c34b (diff)
Merge pull request #88 from qkzk/v0.1.26-searchHEADv0.1.26master
V0.1.26 search
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.
///