From OpenBSD:

revision 1.23
date: 2003/08/23 02:30:59;  author: fgsch;  state: Exp;  lines: +2 -2
under emacs mode, fix the case when the globbed file and the longest
prefix lenghts are equal ("a .b" and "a ab" by instance).
found and tested by otto@.
This commit is contained in:
wiz 2003-08-26 07:27:42 +00:00
parent a5efa8b763
commit 80d20cd1d2
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: emacs.c,v 1.16 2003/06/23 11:38:55 agc Exp $ */
/* $NetBSD: emacs.c,v 1.17 2003/08/26 07:27:42 wiz Exp $ */
/*
* Emacs-like command line editing and history
@ -10,7 +10,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: emacs.c,v 1.16 2003/06/23 11:38:55 agc Exp $");
__RCSID("$NetBSD: emacs.c,v 1.17 2003/08/26 07:27:42 wiz Exp $");
#endif
@ -1823,7 +1823,7 @@ do_complete(flags, type)
olen = end - start;
nlen = x_longest_prefix(nwords, words);
/* complete */
if (nlen > olen) {
if (nwords == 1 || nlen > olen) {
x_goto(xbuf + start);
x_delete(olen, FALSE);
x_escape(words[0], nlen, x_emacs_putbuf);