aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/commands.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-10-16 07:58:26 +0000
committerBlaž Hrastnik2020-10-16 07:58:26 +0000
commitbc2c652fe885c7e7953224268688a6d7b6dea80e (patch)
tree4fc870f35222ab9e76d68c045cc16832924a6607 /helix-view/src/commands.rs
parent49b4cdb5669b1c572b2b26af4353cb16cb1260f7 (diff)
Bugfix
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!()
}