Move right at the end of line.

This commit is contained in:
Saumya Bhatnagar 2018-05-29 01:13:16 +05:30
parent 1dc1b82b7d
commit 0e925a780a
2 changed files with 3 additions and 0 deletions

BIN
editor

Binary file not shown.

View File

@ -330,6 +330,9 @@ void editorMoveCursor(int c) {
case ARROW_RIGHT:
if (erow && E.cursorX < erow->length) { // allow scroll till one char past end of line
E.cursorX++;
} else if (erow && E.cursorX == erow->length) {
E.cursorY++;
E.cursorX = 0;
}
break;
case ARROW_UP: