aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/commands.rs
diff options
context:
space:
mode:
authorJan Hrastnik2020-10-09 20:55:45 +0000
committerBlaž Hrastnik2020-10-16 02:59:09 +0000
commitc60f1a655333f41460e21a2e193734864f43211c (patch)
tree581322c499546f03abb77e19455adaa73d3c4669 /helix-view/src/commands.rs
parent9e7b6465c6d4ce087af82ec07e41e19dbf4abdfb (diff)
created prompt.rs
Diffstat (limited to 'helix-view/src/commands.rs')
-rw-r--r--helix-view/src/commands.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/helix-view/src/commands.rs b/helix-view/src/commands.rs
index 0e3f7ce8..6efbf98d 100644
--- a/helix-view/src/commands.rs
+++ b/helix-view/src/commands.rs
@@ -8,7 +8,10 @@ use helix_core::{
};
use once_cell::sync::Lazy;
-use crate::view::{View, PADDING};
+use crate::{
+ prompt::Prompt,
+ view::{View, PADDING},
+};
/// A command is a function that takes the current state and a count, and does a side-effect on the
/// state (usually by creating and applying a transaction).
@@ -478,6 +481,10 @@ pub mod insert {
}
}
+pub fn insert_char_prompt(prompt: &mut Prompt, c: char) {
+ prompt.insert_char(c);
+}
+
// Undo / Redo
pub fn undo(view: &mut View, _count: usize) {