summaryrefslogtreecommitdiffstats
path: root/contrib/nvi/vi
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2013-11-11 16:52:02 +0000
committerpeter <peter@FreeBSD.org>2013-11-11 16:52:02 +0000
commitaa72ff78d359a6d72be67471e975b6510987fe0b (patch)
tree0930288f13fda7a3b61b3f30402152bd8564197f /contrib/nvi/vi
parent587aa2d7ea7a421590ac304146d66f82144ca8b2 (diff)
downloadFreeBSD-src-aa72ff78d359a6d72be67471e975b6510987fe0b.zip
FreeBSD-src-aa72ff78d359a6d72be67471e975b6510987fe0b.tar.gz
Merge nvi-2.1.1 -> 2.1.2
Diffstat (limited to 'contrib/nvi/vi')
-rw-r--r--contrib/nvi/vi/v_txt.c3
-rw-r--r--contrib/nvi/vi/vs_refresh.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/contrib/nvi/vi/v_txt.c b/contrib/nvi/vi/v_txt.c
index e81e348..1348b27 100644
--- a/contrib/nvi/vi/v_txt.c
+++ b/contrib/nvi/vi/v_txt.c
@@ -295,7 +295,8 @@ v_txt(
tiqh = sp->tiq;
if (!TAILQ_EMPTY(tiqh)) {
tp = TAILQ_FIRST(tiqh);
- if (TAILQ_NEXT(tp, q) != NULL || tp->lb_len < len + 32) {
+ if (TAILQ_NEXT(tp, q) != NULL ||
+ tp->lb_len < (len + 32) * sizeof(CHAR_T)) {
text_lfree(tiqh);
goto newtp;
}
diff --git a/contrib/nvi/vi/vs_refresh.c b/contrib/nvi/vi/vs_refresh.c
index 98b66c4..8343b80 100644
--- a/contrib/nvi/vi/vs_refresh.c
+++ b/contrib/nvi/vi/vs_refresh.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "$Id: vs_refresh.c,v 10.52 2011/12/16 11:06:25 zy Exp $";
+static const char sccsid[] = "$Id: vs_refresh.c,v 10.53 2013/11/01 11:57:36 zy Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -331,7 +331,8 @@ small_fill: (void)gp->scr_move(sp, LASTLINE(sp), 0);
if (vs_sm_1down(sp))
return (1);
goto adjust;
- }
+ } else
+ goto top; /* XXX No such line. */
/*
* If less than a half screen from the bottom of the file,
OpenPOWER on IntegriCloud