diff options
author | Jan Hrastnik | 2020-10-13 16:57:55 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-10-16 03:01:21 +0000 |
commit | 7d58378374388c031ad09ceb2e27d4a0792d636e (patch) | |
tree | 087f82de0253f16458db12b4f608a8ed5d5435b9 /helix-view/src/commands.rs | |
parent | ed03ec92a825b8e42005f2f8506b0f3db4923fa5 (diff) |
added move left&right, delete char
Diffstat (limited to 'helix-view/src/commands.rs')
-rw-r--r-- | helix-view/src/commands.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/helix-view/src/commands.rs b/helix-view/src/commands.rs index 888317e7..6efbf98d 100644 --- a/helix-view/src/commands.rs +++ b/helix-view/src/commands.rs @@ -307,20 +307,8 @@ pub fn append_mode(view: &mut View, _count: usize) { }) } -pub fn prompt_mode(view: &mut View, _count: usize) { - view.state.mode = Mode::Prompt; -} - -pub fn move_char_left_prompt(prompt: &mut Prompt, _char: char) { - if prompt.cursor_loc > 1 { - prompt.cursor_loc -= 1; - } -} - -pub fn move_char_right_prompt(prompt: &mut Prompt, _char: char) { - if prompt.cursor_loc < prompt.buffer.len() { - prompt.cursor_loc += 1; - } +pub fn command_mode(view: &mut View, _count: usize) { + view.state.mode = Mode::Command; } // TODO: I, A, o and O can share a lot of the primitives. |