Skip to content

Commit

Permalink
Adding in support for arrow keys in normal mode for moving.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanKingston committed Jun 6, 2018
1 parent 865c057 commit 509df59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,22 @@ impl Editor {
mode: InsertMode::Insert,
}));
}
(Command(Normal), Char('h')) => {
(Command(Normal), Left) | (Command(Normal), Char('h')) => {
let left = self.left(n);
self.goto(left);
mov = true;
}
(Command(Normal), Char('j')) => {
(Command(Normal), Down) | (Command(Normal), Char('j')) => {
let down = self.down(n);
self.goto(down);
mov = true;
}
(Command(Normal), Char('k')) => {
(Command(Normal), Up) | (Command(Normal), Char('k')) => {
let up = self.up(n);
self.goto(up);
mov = true;
}
(Command(Normal), Char('l')) => {
(Command(Normal), Right) | (Command(Normal), Char('l')) => {
let right = self.right(n, true);
self.goto(right);
mov = true;
Expand Down

0 comments on commit 509df59

Please sign in to comment.