about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-22 11:28:29 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-22 11:28:29 +0000
commit91f40b975f17242cfcdb8b9b2166033b7f02f102 (patch)
tree072e17fc4c6ef6307764fbdabafc2d112115f637 /Src/Zle
parentc955b76cc54a8db00d7d9708dfa405685ab63675 (diff)
downloadzsh-91f40b975f17242cfcdb8b9b2166033b7f02f102.tar.gz
zsh-91f40b975f17242cfcdb8b9b2166033b7f02f102.tar.xz
zsh-91f40b975f17242cfcdb8b9b2166033b7f02f102.zip
be more careful when decided if to insert tabs instead of completing (11493)
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/compcore.c4
-rw-r--r--Src/Zle/zle_tricky.c2
2 files changed, 4 insertions, 2 deletions
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;