about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-22 14:50:07 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-22 14:50:07 +0000
commit01bd1c61ae5f19089896eff825ce4927b96be296 (patch)
treed6a238e4cede382292f7f152c829c365471e8ac5 /Src
parentbf40a2f40ceb59287ee3c64433acc855caef0e00 (diff)
downloadzsh-01bd1c61ae5f19089896eff825ce4927b96be296.tar.gz
zsh-01bd1c61ae5f19089896eff825ce4927b96be296.tar.xz
zsh-01bd1c61ae5f19089896eff825ce4927b96be296.zip
make sure wouldinstab is set before calling docomplete() (11503)
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_tricky.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 1c706fdd1..0d10a0446 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -158,7 +158,6 @@ usetab(void)
 {
     unsigned char *s = line + cs - 1;
 
-    wouldinstab = 0;
     if (keybuf[0] != '\t' || keybuf[1])
 	return 0;
     for (; s >= line && *s != '\n'; s--)
@@ -192,6 +191,7 @@ completeword(char **args)
 {
     usemenu = !!isset(MENUCOMPLETE);
     useglob = isset(GLOBCOMPLETE);
+    wouldinstab = 0;
     if (c == '\t' && usetab())
 	return selfinsert(args);
     else {
@@ -213,6 +213,7 @@ menucomplete(char **args)
 {
     usemenu = 1;
     useglob = isset(GLOBCOMPLETE);
+    wouldinstab = 0;
     if (c == '\t' && usetab())
 	return selfinsert(args);
     else
@@ -225,6 +226,7 @@ listchoices(char **args)
 {
     usemenu = !!isset(MENUCOMPLETE);
     useglob = isset(GLOBCOMPLETE);
+    wouldinstab = 0;
     return docomplete(COMP_LIST_COMPLETE);
 }
 
@@ -233,6 +235,7 @@ int
 spellword(char **args)
 {
     usemenu = useglob = 0;
+    wouldinstab = 0;
     return docomplete(COMP_SPELL);
 }
 
@@ -242,6 +245,7 @@ deletecharorlist(char **args)
 {
     usemenu = !!isset(MENUCOMPLETE);
     useglob = isset(GLOBCOMPLETE);
+    wouldinstab = 0;
 
     if (cs != ll) {
 	fixsuffix();
@@ -256,6 +260,7 @@ int
 expandword(char **args)
 {
     usemenu = useglob = 0;
+    wouldinstab = 0;
     if (c == '\t' && usetab())
 	return selfinsert(args);
     else
@@ -268,6 +273,7 @@ expandorcomplete(char **args)
 {
     usemenu = !!isset(MENUCOMPLETE);
     useglob = isset(GLOBCOMPLETE);
+    wouldinstab = 0;
     if (c == '\t' && usetab())
 	return selfinsert(args);
     else {
@@ -289,6 +295,7 @@ menuexpandorcomplete(char **args)
 {
     usemenu = 1;
     useglob = isset(GLOBCOMPLETE);
+    wouldinstab = 0;
     if (c == '\t' && usetab())
 	return selfinsert(args);
     else
@@ -301,6 +308,7 @@ listexpand(char **args)
 {
     usemenu = !!isset(MENUCOMPLETE);
     useglob = isset(GLOBCOMPLETE);
+    wouldinstab = 0;
     return docomplete(COMP_LIST_EXPAND);
 }
 
@@ -308,6 +316,7 @@ listexpand(char **args)
 mod_export int
 reversemenucomplete(char **args)
 {
+    wouldinstab = 0;
     if (!menucmp)
 	return menucomplete(args);
 
@@ -319,6 +328,7 @@ reversemenucomplete(char **args)
 int
 acceptandmenucomplete(char **args)
 {
+    wouldinstab = 0;
     if (!menucmp)
 	return 1;
     runhookdef(ACCEPTCOMPHOOK, NULL);