Currently in mg, if you have a paragraph: 123 456
With the cursor on either the 4, 5 or 6 and no newline after the '6', and then execute forward-paragraph (M-}), the cursor sits still and does not move to the end of second line (after the 6), which is in effect the end of parapraph. This diff fixes that behaviour. ok? -lum Index: paragraph.c =================================================================== RCS file: /cvs/src/usr.bin/mg/paragraph.c,v retrieving revision 1.44 diff -u -p -u -p -r1.44 paragraph.c --- paragraph.c 14 Apr 2016 17:05:32 -0000 1.44 +++ paragraph.c 5 Sep 2016 14:34:45 -0000 @@ -108,13 +108,13 @@ do_gotoeop(int f, int n, int *i) curwp->w_dotp = lforw(curwp->w_dotp); curwp->w_dotline++; - /* do not continue after end of buffer */ - if (lforw(curwp->w_dotp) == curbp->b_headp) { - gotoeol(FFRAND, 1); - curwp->w_rflag |= WFMOVE; - return (FALSE); - } } + } + /* do not continue after end of buffer */ + if (lforw(curwp->w_dotp) == curbp->b_headp) { + gotoeol(FFRAND, 1); + curwp->w_rflag |= WFMOVE; + return (FALSE); } /* force screen update */