Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit Fix bug where tab completion on the second or > ...



details:   https://anonhg.NetBSD.org/src/rev/403f716c4a0c
branches:  trunk
changeset: 750368:403f716c4a0c
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Dec 28 21:52:43 2009 +0000

description:
Fix bug where tab completion on the second or > line that caused listing
ended up corrupting the display by an extra space in the beginning. Reported
by Mac Chan.

diffstat:

 lib/libedit/refresh.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r a69e3f5b0794 -r 403f716c4a0c lib/libedit/refresh.c
--- a/lib/libedit/refresh.c     Mon Dec 28 18:25:44 2009 +0000
+++ b/lib/libedit/refresh.c     Mon Dec 28 21:52:43 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refresh.c,v 1.32 2009/07/17 12:28:27 christos Exp $    */
+/*     $NetBSD: refresh.c,v 1.33 2009/12/28 21:52:43 christos Exp $    */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)refresh.c  8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: refresh.c,v 1.32 2009/07/17 12:28:27 christos Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.33 2009/12/28 21:52:43 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -1133,10 +1133,10 @@
 
        if (EL_CAN_CEOL) {
                int i;
-               term_move_to_char(el, 0);
-               for (i = 0; i <= el->el_refresh.r_oldcv; i++) {
+               for (i = el->el_refresh.r_oldcv; i >= 0; i--) {
                        /* for each line on the screen */
                        term_move_to_line(el, i);
+                       term_move_to_char(el, 0);
                        term_clear_EOL(el, el->el_term.t_size.h);
                }
                term_move_to_line(el, 0);



Home | Main Index | Thread Index | Old Index