Move to the end of line with END

This commit is contained in:
Saumya Bhatnagar 2018-05-29 06:30:38 +05:30
parent 3535712956
commit 45543f3bb1
2 changed files with 3 additions and 1 deletions

BIN
editor

Binary file not shown.

View File

@ -436,7 +436,9 @@ void editorProcessKey() {
E.cursorX = 0;
break;
case END_KEY:
E.cursorX = E.screencols - 1;
if (E.cursorY < E.numrows) {
E.cursorX = E.erow[E.cursorY].length;
}
break;
}
}