helix-mods/helix-view/src/prompt.rs

19 lines
299 B
Rust
Raw Normal View History

2020-10-09 22:55:45 +02:00
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);
}
}