aboutsummaryrefslogtreecommitdiff
path: root/contrib/nvi/vi
diff options
context:
space:
mode:
authorSheldon Hearn <sheldonh@FreeBSD.org>2002-01-31 14:23:49 +0000
committerSheldon Hearn <sheldonh@FreeBSD.org>2002-01-31 14:23:49 +0000
commitcd65b21c06fedd952c80ecfaa41248ab65cd5169 (patch)
tree4ad47f32864fb08a00e3b69858bf298d27d211f2 /contrib/nvi/vi
parent92fd4795fa78bf3beebbdacd7f9c78e7f746cb01 (diff)
downloadsrc-cd65b21c06fedd952c80ecfaa41248ab65cd5169.tar.gz
src-cd65b21c06fedd952c80ecfaa41248ab65cd5169.zip
Merge rev 1.1.1.3 from vendor branch: fix refresh / warning deadlock
Notes
Notes: svn path=/head/; revision=90026
Diffstat (limited to 'contrib/nvi/vi')
-rw-r--r--contrib/nvi/vi/vs_line.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/contrib/nvi/vi/vs_line.c b/contrib/nvi/vi/vs_line.c
index 514b4269fd12..495e75e8f1b6 100644
--- a/contrib/nvi/vi/vs_line.c
+++ b/contrib/nvi/vi/vs_line.c
@@ -53,7 +53,7 @@ vs_line(sp, smp, yp, xp)
size_t chlen, cno_cnt, cols_per_screen, len, nlen;
size_t offset_in_char, offset_in_line, oldx, oldy;
size_t scno, skip_cols, skip_screens;
- int ch, dne, is_cached, is_partial, is_tab;
+ int ch, dne, is_cached, is_partial, is_tab, no_draw;
int list_tab, list_dollar;
char *p, *cbp, *ecbp, cbuf[128];
@@ -65,10 +65,11 @@ vs_line(sp, smp, yp, xp)
* If ex modifies the screen after ex output is already on the screen,
* don't touch it -- we'll get scrolling wrong, at best.
*/
+ no_draw = 0;
if (!F_ISSET(sp, SC_TINPUT_INFO) && VIP(sp)->totalcount > 1)
- return (0);
+ no_draw = 1;
if (F_ISSET(sp, SC_SCR_EXWROTE) && smp - HMAP != LASTLINE(sp))
- return (0);
+ no_draw = 1;
/*
* Assume that, if the cache entry for the line is filled in, the
@@ -77,7 +78,7 @@ vs_line(sp, smp, yp, xp)
* cursor position, we can just return.
*/
is_cached = SMAP_CACHE(smp);
- if (yp == NULL && is_cached)
+ if (yp == NULL && (is_cached || no_draw))
return (0);
/*
@@ -162,7 +163,7 @@ vs_line(sp, smp, yp, xp)
}
/* If the line is on the screen, quit. */
- if (is_cached)
+ if (is_cached || no_draw)
goto ret1;
/* Set line cache information. */
@@ -329,7 +330,7 @@ display:
offset_in_line + cols_per_screen < sp->cno) {
cno_cnt = 0;
/* If the line is on the screen, quit. */
- if (is_cached)
+ if (is_cached || no_draw)
goto ret1;
} else
cno_cnt = (sp->cno - offset_in_line) + 1;
@@ -393,12 +394,12 @@ display:
*xp += O_NUMBER_LENGTH;
/* If the line is on the screen, quit. */
- if (is_cached)
+ if (is_cached || no_draw)
goto ret1;
}
/* If the line is on the screen, don't display anything. */
- if (is_cached)
+ if (is_cached || no_draw)
continue;
#define FLUSH { \