summaryrefslogtreecommitdiff
path: root/usr.bin/mg/window.c
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2014-05-28 07:59:37 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2014-05-28 07:59:37 +0000
commit6b021716d6d6e5653ea3ced71e0b2137e743641f (patch)
tree154f07d296a9913157eb78fcfc65429ccf176f1d /usr.bin/mg/window.c
parent0ee5625ee86a297aa31a197b277373f3a1ef3119 (diff)
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@
Diffstat (limited to 'usr.bin/mg/window.c')
-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 */