From c1a33575b4c522cea71c57664c852727fe6a633c Mon Sep 17 00:00:00 2001 From: dana Date: Wed, 8 May 2019 16:35:08 -0500 Subject: 44275: Fix compset -p/-s multibyte inconsistency and documentation --- ChangeLog | 5 +++++ Doc/Zsh/compwid.yo | 4 ++-- Src/Zle/complete.c | 2 +- 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 + + * 44275: Doc/Zsh/compwid.yo, Src/Zle/complete.c: Fix compset -p/-s + multibyte inconsistency and documentation + 2019-05-07 Oliver Kiddle * 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); -- cgit 1.4.1