diff options
author | 2003-08-23 02:30:59 +0000 | |
---|---|---|
committer | 2003-08-23 02:30:59 +0000 | |
commit | de04cf22b72a3b77fe600cb6e4cf98d7e4c8a93d (patch) | |
tree | ec7f63397a50da35d1a8c8074d142a393f447919 /bin/ksh/emacs.c | |
parent | correct printf arg mismatch (in 64bit arch). dhartmei ok (diff) | |
download | wireguard-openbsd-de04cf22b72a3b77fe600cb6e4cf98d7e4c8a93d.tar.xz wireguard-openbsd-de04cf22b72a3b77fe600cb6e4cf98d7e4c8a93d.zip |
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@.
Diffstat (limited to 'bin/ksh/emacs.c')
-rw-r--r-- | bin/ksh/emacs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c index 451519b3a0f..8ad90db10a6 100644 --- a/bin/ksh/emacs.c +++ b/bin/ksh/emacs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emacs.c,v 1.22 2003/08/02 19:44:12 fgsch Exp $ */ +/* $OpenBSD: emacs.c,v 1.23 2003/08/23 02:30:59 fgsch Exp $ */ /* * Emacs-like command line editing and history @@ -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); |