aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/prompt.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/prompt.rs
parent9e7b6465c6d4ce087af82ec07e41e19dbf4abdfb (diff)
created prompt.rs
Diffstat (limited to 'helix-view/src/prompt.rs')
-rw-r--r--helix-view/src/prompt.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/helix-view/src/prompt.rs b/helix-view/src/prompt.rs
new file mode 100644
index 00000000..4aaf770b
--- /dev/null
+++ b/helix-view/src/prompt.rs
@@ -0,0 +1,18 @@
+use std::string::String;
+
+pub struct Prompt {
+ pub buffer: String,
+}
+
+impl Prompt {
+ pub fn new() -> Prompt {
+ let prompt = Prompt {
+ buffer: String::from(""),
+ };
+ prompt
+ }
+
+ pub fn insert_char(&mut self, c: char) {
+ self.buffer.push(c);
+ }
+}