Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/vi/vi Pull in a patch from nvi 1.79 for when the rep...



details:   https://anonhg.NetBSD.org/src/rev/e95e46866bbf
branches:  trunk
changeset: 507381:e95e46866bbf
user:      simonb <simonb%NetBSD.org@localhost>
date:      Wed Mar 21 03:19:35 2001 +0000

description:
Pull in a patch from nvi 1.79 for when the repainting code messes up.
Fixes those annoying "Error: move: l(4294967295) c(0) o(0)" core dumps.

diffstat:

 usr.bin/vi/vi/vs_refresh.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r a7084ddb8c63 -r e95e46866bbf usr.bin/vi/vi/vs_refresh.c
--- a/usr.bin/vi/vi/vs_refresh.c        Wed Mar 21 03:16:38 2001 +0000
+++ b/usr.bin/vi/vi/vs_refresh.c        Wed Mar 21 03:19:35 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vs_refresh.c,v 1.5 2000/10/18 01:42:13 tv Exp $        */
+/*     $NetBSD: vs_refresh.c,v 1.6 2001/03/21 03:19:35 simonb Exp $    */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -642,10 +642,16 @@
 #ifdef DEBUG
        /*
         * Sanity checking.  When the repainting code messes up, the usual
-        * result is we don't repaint the cursor.  Die now.
+        * result is we don't repaint the cursor and so sc_smap will be
+        * NULL.  If we're debugging, die, otherwise restart from scratch.
         */
        if (vip->sc_smap == NULL)
                abort();
+#else
+       if (vip->sc_smap == NULL) {
+               F_SET(sp, SC_SCR_REFORMAT);
+               return (vs_paint(sp, flags));
+       }
 #endif
 
        /*



Home | Main Index | Thread Index | Old Index