summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Core/_main_complete2
-rw-r--r--Doc/Zsh/compwid.yo3
-rw-r--r--Src/Zle/compcore.c4
-rw-r--r--Src/Zle/zle_tricky.c2
5 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index fc649263d..dedfe7a79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2000-05-22  Sven Wischnowsky  <wischnow@zsh.org>
 
+	* 11493: Completion/Core/_main_complete, Doc/Zsh/compwid.yo,
+ 	Src/Zle/compcore.c, Src/Zle/zle_tricky.c: be more careful when
+ 	decided if to insert tabs instead of completing
+	
 	* 11490: Doc/Zsh/mod_zutil.yo, Src/Modules/zutil.c: remove -h
  	option from zstyle
 	
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index 19295a991..636098c04 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -41,7 +41,7 @@ typeset -U _lastdescr _comp_ignore
 if [[ "$compstate[insert]" = tab* && "$WIDGET" != *list* ]]; then
   { zstyle -T ":completion:${curcontext}:" insert-tab &&
     { [[ "$curcontext" != :* || -z "$compstate[vared]" ]] ||
-        zstyle -t ":completion:vared${curcontext}:" insert-tab } } && return 1
+        zstyle -t ":completion:vared${curcontext}:" insert-tab } } && return 0
 
   compstate[insert]="${compstate[insert]//tab /}"
 fi
diff --git a/Doc/Zsh/compwid.yo b/Doc/Zsh/compwid.yo
index 4614e4bd6..e2083baba 100644
--- a/Doc/Zsh/compwid.yo
+++ b/Doc/Zsh/compwid.yo
@@ -314,8 +314,7 @@ match to insert, given after a colon.  For example, `tt(menu:2)' says
 to start menucompletion, beginning with the second match.
 
 Note that a value containing the substring `tt(tab)' makes the
-matches generated be ignored and only the character that was used to
-call the completion widget be inserted.
+matches generated be ignored and only the TAB be inserted.
 
 Finally, it may also be set to tt(all), which makes all matches
 generated be inserted into the line.
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 1b16870d1..4c109ed4e 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -335,7 +335,7 @@ do_completion(Hookdef dummy, Compldat dat)
 	ret = 1;
 	minfo.cur = NULL;
 	if (useline < 0)
-	    selfinsert(zlenoargs);
+	    ret = selfinsert(zlenoargs);
 	goto compend;
     }
     zsfree(lastprebr);
@@ -345,7 +345,7 @@ do_completion(Hookdef dummy, Compldat dat)
     if (comppatmatch && *comppatmatch && comppatmatch != opm)
 	haspattern = 1;
     if (useline < 0)
-	selfinsert(zlenoargs);
+	ret = selfinsert(zlenoargs);
     else if (!useline && uselist) {
 	/* All this and the guy only wants to see the list, sigh. */
 	cs = 0;
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index f516fe211..1c706fdd1 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -159,6 +159,8 @@ usetab(void)
     unsigned char *s = line + cs - 1;
 
     wouldinstab = 0;
+    if (keybuf[0] != '\t' || keybuf[1])
+	return 0;
     for (; s >= line && *s != '\n'; s--)
 	if (*s != '\t' && *s != ' ')
 	    return 0;