diff options
Diffstat (limited to 'driver.f90')
-rw-r--r-- | driver.f90 | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -43,10 +43,21 @@ implicit none E%cy = min(E%cy + 1, E%screenrows) cursor_moved = .true. case(KEY_LEFT) - E%cx = max(E%cx - 1, 0) + E%cx = E%cx - 1 + if(E%cx < 0) then + E%cx = 0 + E%coloff = min(E%coloff + 1, 0) + end if cursor_moved = .true. case(KEY_RIGHT) - E%cx = min(E%cx + 1, E%screencols) + E%cx = E%cx + 1 + + Print *, E%cx, E%cy, E%rowoff, E%coloff + + if(E%cx > E%screencols) then + E%coloff = E%coloff - 1 + E%cx = E%cx - 1 + end if cursor_moved = .true. case(KEY_PGUP) delta = -1*E%screenrows |