Minor fixes to w command, still glitchy
This commit is contained in:
parent
c84afc7614
commit
7d3dba06c3
7
hermes.c
7
hermes.c
|
@ -1256,9 +1256,14 @@ void editorCommandKp(int c) {
|
|||
editorNextWord();
|
||||
int len = start_y == E.cy ? E.cx - start_x : E.row[start_y].size - start_x;
|
||||
editorUpdatePaste(&E.row[start_y].chars[start_x], len);
|
||||
while (E.cy != start_y || E.cx != start_x) {
|
||||
if (E.cy != start_y) {
|
||||
E.cy--;
|
||||
E.cx = E.row[E.cy].size;
|
||||
}
|
||||
while (E.cx != start_x) {
|
||||
editorDeleteChar();
|
||||
}
|
||||
if (E.cx > E.row[E.cy].size - 1) E.cx--;
|
||||
} else {
|
||||
editorNextWord();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue