diff options
author | 2014-10-12 18:09:41 +0000 | |
---|---|---|
committer | 2014-10-12 18:09:41 +0000 | |
commit | b9d02dd9db4550486c36c57e554334f2b127a2ad (patch) | |
tree | 45f3efef4ec5f9f30e7903a6672e278015944426 | |
parent | simple message parser to be used in smtp incoming sessions, not plugged yet (diff) | |
download | wireguard-openbsd-b9d02dd9db4550486c36c57e554334f2b127a2ad.tar.xz wireguard-openbsd-b9d02dd9db4550486c36c57e554334f2b127a2ad.zip |
Fix a bug in backward-paragraph. If the cursor is on the first line of
a paragraph, it jumps to the start of the previous paragraph if you
press M-{. Input and fix to my diff from florian@
-rw-r--r-- | usr.bin/mg/paragraph.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/mg/paragraph.c b/usr.bin/mg/paragraph.c index d45efc4e97a..a80f572394c 100644 --- a/usr.bin/mg/paragraph.c +++ b/usr.bin/mg/paragraph.c @@ -1,4 +1,4 @@ -/* $OpenBSD: paragraph.c,v 1.31 2014/03/27 09:30:55 florian Exp $ */ +/* $OpenBSD: paragraph.c,v 1.32 2014/10/12 18:09:41 lum Exp $ */ /* This file is in the public domain. */ @@ -35,8 +35,6 @@ gotobop(int f, int n) while (n-- > 0) { nospace = 0; while (lback(curwp->w_dotp) != curbp->b_headp) { - curwp->w_dotp = lback(curwp->w_dotp); - curwp->w_dotline--; curwp->w_doto = 0; col = 0; @@ -49,6 +47,9 @@ gotobop(int f, int n) break; } else nospace = 1; + + curwp->w_dotline--; + curwp->w_dotp = lback(curwp->w_dotp); } } /* force screen update */ |