summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlum <lum@openbsd.org>2016-09-06 16:25:47 +0000
committerlum <lum@openbsd.org>2016-09-06 16:25:47 +0000
commit9f6ffbf0f3138da2497c930dd8836dbcf14f80d7 (patch)
treecb6ada6ab4238c5de134fec9847d32a0d540492b
parentsync (diff)
downloadwireguard-openbsd-9f6ffbf0f3138da2497c930dd8836dbcf14f80d7.tar.xz
wireguard-openbsd-9f6ffbf0f3138da2497c930dd8836dbcf14f80d7.zip
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.
-rw-r--r--usr.bin/mg/paragraph.c14
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;