about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Doc/Zsh/compwid.yo4
-rw-r--r--Src/Zle/complete.c2
3 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f7af378b..366a8b984 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-05-08  dana  <dana@dana.is>
+
+	* 44275: Doc/Zsh/compwid.yo, Src/Zle/complete.c: Fix compset -p/-s
+	multibyte inconsistency and documentation
+
 2019-05-07  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
 	* 44274: Completion/Base/Core/_description,
diff --git a/Doc/Zsh/compwid.yo b/Doc/Zsh/compwid.yo
index 0d8d4cc40..b74db8408 100644
--- a/Doc/Zsh/compwid.yo
+++ b/Doc/Zsh/compwid.yo
@@ -751,8 +751,8 @@ The options are:
 
 startitem()
 item(tt(-p) var(number))(
-If the contents of the tt(PREFIX) parameter is longer than var(number)
-characters, the first var(number) characters are removed from it and
+If the value of the tt(PREFIX) parameter is at least var(number)
+characters long, the first var(number) characters are removed from it and
 appended to the contents of the tt(IPREFIX) parameter.
 )
 item(tt(-P) [ var(number) ] var(pattern))(
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c
index c2f46c7f5..7d9751fa6 100644
--- a/Src/Zle/complete.c
+++ b/Src/Zle/complete.c
@@ -1011,7 +1011,7 @@ do_comp_vars(int test, int na, char *sa, int nb, char *sb, int mod)
 		}
 	    } else
 #endif
-	    if ((int)strlen(test == CVT_PRENUM ? compprefix : compsuffix) >= na)
+	    if ((int)strlen(test == CVT_PRENUM ? compprefix : compsuffix) < na)
 		return 0;
 	    if (test == CVT_PRENUM)
 		ignore_prefix(na);