Source-Changes-HG archive

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

[src/trunk]: src/bin/ksh From OpenBSD:



details:   https://anonhg.NetBSD.org/src/rev/996223240c05
branches:  trunk
changeset: 550946:996223240c05
user:      wiz <wiz%NetBSD.org@localhost>
date:      Tue Aug 26 07:27:42 2003 +0000

description:
>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@.

diffstat:

 bin/ksh/emacs.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ac87b72c5b48 -r 996223240c05 bin/ksh/emacs.c
--- a/bin/ksh/emacs.c   Tue Aug 26 05:06:34 2003 +0000
+++ b/bin/ksh/emacs.c   Tue Aug 26 07:27:42 2003 +0000
@@ -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 @@
        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);



Home | Main Index | Thread Index | Old Index