summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Core/_main_complete4
-rw-r--r--Completion/Core/_setup2
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d57d64f90..5a2ad86b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2001-03-26 Sven Wischnowsky <wischnow@zsh.org>
+ * 13768: Completion/Core/_main_complete,
+ Completion/Core/_setup: unset ZLS_COLORS if list-colors not
+ set
+
* 13767: Src/Zle/zle_utils.c: avoid adding empty strings to
the kill ring
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index 69ee24ae2..3c2a61cce 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -302,8 +302,10 @@ fi
if [[ "$compstate[old_list]" = keep ]]; then
ZLS_COLORS="$_saved_colors"
-else
+elif (( $#_comp_colors )); then
ZLS_COLORS="${(j.:.)_comp_colors}"
+else
+ unset ZLS_COLORS
fi
# Now call the post-functions.
diff --git a/Completion/Core/_setup b/Completion/Core/_setup
index 11b618c49..0eed7b7cb 100644
--- a/Completion/Core/_setup
+++ b/Completion/Core/_setup
@@ -20,7 +20,7 @@ if zstyle -a ":completion:${curcontext}:$1" list-colors val; then
# ZLS_COLORS="$ZLS_COLORS$ZLS_COLOURS"
elif [[ "$1" = default ]]; then
- ZLS_COLORS=
+ unset ZLS_COLORS
fi
if zstyle -t ":completion:${curcontext}:$1" list-packed; then