summaryrefslogtreecommitdiff
path: root/lib/libedit/refresh.c
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>2000-02-19 09:08:16 +0000
committermycroft <mycroft@NetBSD.org>2000-02-19 09:08:16 +0000
commit05fc321ebf04f3734e42e86b96897df8aa4469ce (patch)
treec4ac67e9345ca53c363c900360fff4afdb6282e9 /lib/libedit/refresh.c
parentfb5d3e9da41224f82b08f9ecceabced63ea7fe27 (diff)
Fix refresh glitches when using auto-margin.
Diffstat (limited to 'lib/libedit/refresh.c')
-rw-r--r--lib/libedit/refresh.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libedit/refresh.c b/lib/libedit/refresh.c
index 69786bcbca7..6253cbf86a0 100644
--- a/lib/libedit/refresh.c
+++ b/lib/libedit/refresh.c
@@ -1,4 +1,4 @@
-/* $NetBSD: refresh.c,v 1.12 2000/01/20 22:56:21 christos Exp $ */
+/* $NetBSD: refresh.c,v 1.13 2000/02/19 09:08:16 mycroft Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)refresh.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: refresh.c,v 1.12 2000/01/20 22:56:21 christos Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.13 2000/02/19 09:08:16 mycroft Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -753,7 +753,7 @@ re_update_line(el, old, new, i)
else
fx = 0;
- if (sx < 0) {
+ if (sx < 0 && (ose - old) + fx < el->el_term.t_size.h) {
ELRE_DEBUG(1,(__F, "second diff delete at %d...\r\n", (ose - old) + fx),);
/*
* Check if we have stuff to delete
@@ -786,7 +786,8 @@ re_update_line(el, old, new, i)
ELRE_DEBUG(1,(__F, "but with nothing left to save\r\n"),);
term_overwrite(el, nse, (nls - nse));
ELRE_DEBUG(1,(__F, "cleareol %d\n", (oe - old) - (ne - new)),);
- term_clear_EOL(el, (oe - old) - (ne - new));
+ if ((oe - old) - (ne - new) != 0)
+ term_clear_EOL(el, (oe - old) - (ne - new));
}
}