summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2014-05-28 07:59:36 +0000
committerflorian <florian@openbsd.org>2014-05-28 07:59:36 +0000
commitb493fd457da7de678dbf6a9bdebb05ce91528434 (patch)
treed01e928b5fc2e58eba3511c7f3f2aa96ac6df0bf
parentIn his continuing quest to improve our documentation, jmc@ noticed that (diff)
downloadwireguard-openbsd-b493fd457da7de678dbf6a9bdebb05ce91528434.tar.xz
wireguard-openbsd-b493fd457da7de678dbf6a9bdebb05ce91528434.zip
On delete-window, remember the position of dot and mark in the buffer
so that an revisiting the buffer the correct line number is displayed. Found by jasper@ OK lum@
-rw-r--r--usr.bin/mg/window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/mg/window.c b/usr.bin/mg/window.c
index 1b5bd920a68..e62de11570f 100644
--- a/usr.bin/mg/window.c
+++ b/usr.bin/mg/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.30 2014/03/20 07:47:29 lum Exp $ */
+/* $OpenBSD: window.c,v 1.31 2014/05/28 07:59:36 florian Exp $ */
/* This file is in the public domain. */
@@ -417,6 +417,8 @@ delwind(int f, int n)
wp->w_bufp->b_doto = wp->w_doto;
wp->w_bufp->b_markp = wp->w_markp;
wp->w_bufp->b_marko = wp->w_marko;
+ wp->w_bufp->b_dotline = wp->w_dotline;
+ wp->w_bufp->b_markline = wp->w_markline;
}
/* since shrinkwind did't crap out, we know we have a second window */