diff options
author | Mark Lumsden <lum@cvs.openbsd.org> | 2016-09-06 16:25:48 +0000 |
---|---|---|
committer | Mark Lumsden <lum@cvs.openbsd.org> | 2016-09-06 16:25:48 +0000 |
commit | 2f9ea9c3f89db9f841be2fcf42edc87c49233efc (patch) | |
tree | 3efd80dcad9c559a6325d448541345ec691611ec /usr.bin | |
parent | f02a4af3ee2d34cb1f376872c16b04579a544502 (diff) |
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 the second line (after the 6), which is in
effect the end of parapraph. This diff fixes that behaviour.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mg/paragraph.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/mg/paragraph.c b/usr.bin/mg/paragraph.c index ca902c393fe..df8b733c853 100644 --- a/usr.bin/mg/paragraph.c +++ b/usr.bin/mg/paragraph.c @@ -1,4 +1,4 @@ -/* $OpenBSD: paragraph.c,v 1.44 2016/04/14 17:05:32 lum Exp $ */ +/* $OpenBSD: paragraph.c,v 1.45 2016/09/06 16:25:47 lum Exp $ */ /* This file is in the public domain. */ @@ -108,14 +108,14 @@ 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 */ curwp->w_rflag |= WFMOVE; |