Adds r command to replace a char
This commit is contained in:
parent
ea1bf315fd
commit
8447b76e1a
|
@ -1,3 +1,4 @@
|
|||
hermes
|
||||
*.txt
|
||||
test*
|
||||
*.1.gz
|
||||
|
|
13
hermes.c
13
hermes.c
|
@ -1109,6 +1109,19 @@ void editorCommandKp(int c) {
|
|||
case '\033':
|
||||
if (E.mode == VisualMode) E.mode = CommandMode;
|
||||
break;
|
||||
case 'r':
|
||||
{
|
||||
int c = editorReadKey();
|
||||
if (c) {
|
||||
E.mode = InputMode;
|
||||
editorMoveCursor(ARROW_RIGHT);
|
||||
editorDeleteChar();
|
||||
editorInputKp(c);
|
||||
E.mode = CommandMode;
|
||||
editorMoveCursor(ARROW_LEFT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'g':
|
||||
if (deleting) {
|
||||
int totlen = 0;
|
||||
|
|
Loading…
Reference in New Issue