Can some mg user please test this ? It's getting so irritating that I want to smash my keyboard.
Thanks Index: dired.c =================================================================== RCS file: /cvs/src/usr.bin/mg/dired.c,v retrieving revision 1.48 diff -u -p -r1.48 dired.c --- dired.c 23 Jan 2011 00:45:03 -0000 1.48 +++ dired.c 25 Jul 2011 15:36:51 -0000 @@ -36,6 +36,9 @@ static int d_rename(int, int); static int d_shell_command(int, int); static int d_create_directory(int, int); static int d_makename(struct line *, char *, size_t); +static int d_forwpage(int, int); +static int d_backpage(int, int); +static int d_gotoline(int, int); static void reaper(int); extern struct keymap_s helpmap, cXmap, metamap; @@ -58,15 +61,15 @@ static PF diredcl[] = { reposition, /* ^L */ d_findfile, /* ^M */ forwline, /* ^N */ - rescan, /* ^O */ + d_gotoline, /* ^O */ backline, /* ^P */ rescan, /* ^Q */ backisearch, /* ^R */ forwisearch, /* ^S */ - rescan, /* ^T */ + d_backpage, /* ^T */ universal_argument, /* ^U */ forwpage, /* ^V */ - rescan, /* ^W */ + d_forwpage, /* ^W */ NULL /* ^X */ }; @@ -590,6 +593,36 @@ d_makename(struct line *lp, char *fn, si if (strlcat(fn, p, len) >= len) return (FALSE); return ((lgetc(lp, 2) == 'd') ? TRUE : FALSE); +} + +static int +d_forwpage(int f, int n) +{ + forwpage(f | FFRAND, n); + if ((strrchr(curwp->w_dotp->l_text, ' ')) != NULL) + curwp->w_doto = strrchr(curwp->w_dotp->l_text, ' ') - + curwp->w_dotp->l_text + 1; + return TRUE; +} + +static int +d_backpage(int f, int n) +{ + backpage(f | FFRAND, n); + if ((strrchr(curwp->w_dotp->l_text, ' ')) != NULL) + curwp->w_doto = strrchr(curwp->w_dotp->l_text, ' ') - + curwp->w_dotp->l_text + 1; + return TRUE; +} + +static int +d_gotoline(int f, int n) +{ + gotoline(f | FFRAND, n); + if ((strrchr(curwp->w_dotp->l_text, ' ')) != NULL) + curwp->w_doto = strrchr(curwp->w_dotp->l_text, ' ') - + curwp->w_dotp->l_text + 1; + return TRUE; } /*