aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/commands.rs')
-rw-r--r--helix-view/src/commands.rs17
1 files changed, 14 insertions, 3 deletions
diff --git a/helix-view/src/commands.rs b/helix-view/src/commands.rs
index 6efbf98d..33fc06e4 100644
--- a/helix-view/src/commands.rs
+++ b/helix-view/src/commands.rs
@@ -307,8 +307,19 @@ pub fn append_mode(view: &mut View, _count: usize) {
})
}
-pub fn command_mode(view: &mut View, _count: usize) {
- view.state.mode = Mode::Command;
+pub fn command_mode(_view: &mut View, _count: usize) {
+ use crate::Editor;
+
+ let prompt = Prompt::new(
+ ":".to_owned(),
+ |_input: &str| None, // completion
+ |editor: &mut Editor, input: &str| match input {
+ "q" => editor.should_close = true,
+ _ => (),
+ },
+ );
+
+ // set_prompt(prompt)
}
// TODO: I, A, o and O can share a lot of the primitives.
@@ -627,7 +638,7 @@ pub fn unindent(view: &mut View, _count: usize) {
append_changes_to_history(view);
}
-pub fn indent_selection(view: &mut View, _count: usize) {
+pub fn indent_selection(_view: &mut View, _count: usize) {
// loop over each line and recompute proper indentation
unimplemented!()
}