diff --git a/.sconsign.dblite b/.sconsign.dblite index 5000065..24eec80 100644 Binary files a/.sconsign.dblite and b/.sconsign.dblite differ diff --git a/src/config.h b/src/config.h index 4c645ad..6d912aa 100644 --- a/src/config.h +++ b/src/config.h @@ -3,5 +3,6 @@ #define TABSIZE 4 // Tab size as used in render #define MAX_LINE 1024 // maximum line length on screen +#define PGK_DELTA 15 #endif \ No newline at end of file diff --git a/src/ste.c b/src/ste.c index 984bf6e..0e48479 100644 --- a/src/ste.c +++ b/src/ste.c @@ -178,11 +178,19 @@ int main (int argc, char *argv[]) break; case (KEY_END): - t.cur.y = rows.rownum - 1; + t.cur.x = rows.rw[t.cur.y].size; break; case (KEY_HOME): - t.cur.y = 0; + t.cur.x = 0; + break; + + case (KEY_NPAGE): + t.cur.y += PGK_DELTA; + break; + + case (KEY_PPAGE): + t.cur.y -= PGK_DELTA; break; case (CTRL('f')): @@ -489,7 +497,8 @@ void curUpdateRender () */ /* Adjust x and y if they are out of bounds */ - if (t.cur.y < 0 || t.cur.y >= rows.rownum) t.cur.y = 0; + if (t.cur.y < 0) t.cur.y = 0; + if (t.cur.y >= rows.rownum) t.cur.y = rows.rownum - 1; if (t.cur.x < 0) t.cur.x = 0; if (t.cur.y >= t.cur.off_y && t.cur.y < t.cur.off_y + t.dim.y) { diff --git a/src/ste.o b/src/ste.o index 4ed4075..5647054 100644 Binary files a/src/ste.o and b/src/ste.o differ