Fix line number bug when calling onlywind().
authorlum <lum@openbsd.org>
Fri, 9 Oct 2015 07:27:56 +0000 (07:27 +0000)
committerlum <lum@openbsd.org>
Fri, 9 Oct 2015 07:27:56 +0000 (07:27 +0000)
usr.bin/mg/window.c

index d34511e..7e84c5e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: window.c,v 1.33 2015/03/25 20:53:31 bcallah Exp $     */
+/*     $OpenBSD: window.c,v 1.34 2015/10/09 07:27:56 lum Exp $ */
 
 /* This file is in the public domain. */
 
@@ -167,6 +167,8 @@ onlywind(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;
                }
                free(wp);
        }
@@ -178,6 +180,8 @@ onlywind(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;
                }
                free(wp);
        }