Move a line of code which was "obviously" misplaced.
This fixes a core dump when auto-completing filenames and at least one of the file names is larger than the screen width. Bug report and fix by Peter Bex in PR#28382
This commit is contained in:
parent
9e47f7b6ef
commit
0b416121a6
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: v_txt.c,v 1.11 2003/06/06 08:06:47 aymeric Exp $ */
|
||||
/* $NetBSD: v_txt.c,v 1.12 2004/11/23 14:35:45 aymeric Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994
|
||||
|
@ -16,7 +16,7 @@
|
|||
#if 0
|
||||
static const char sccsid[] = "@(#)v_txt.c 10.87 (Berkeley) 10/13/96";
|
||||
#else
|
||||
__RCSID("$NetBSD: v_txt.c,v 1.11 2003/06/06 08:06:47 aymeric Exp $");
|
||||
__RCSID("$NetBSD: v_txt.c,v 1.12 2004/11/23 14:35:45 aymeric Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -2234,8 +2234,8 @@ txt_fc_col(sp, argc, argv)
|
|||
|
||||
/* If the largest file name is too large, just print them. */
|
||||
if (colwidth > sp->cols) {
|
||||
p = msg_print(sp, av[0]->bp + prefix, &nf);
|
||||
for (ac = argc, av = argv; ac > 0; --ac, ++av) {
|
||||
p = msg_print(sp, av[0]->bp + prefix, &nf);
|
||||
(void)ex_printf(sp, "%s\n", p);
|
||||
if (F_ISSET(gp, G_INTERRUPTED))
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue