diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/Zle/computil.c | 11 |
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 46ec99313..74ef69eb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-02-07 Sven Wischnowsky <wischnow@zsh.org> + + * 16582: Src/Zle/computil.c: fix for displaying matches in + groups via _describe; go back to displaying one match per line + when lines get too long + 2002-02-07 Clint Adams <clint@zsh.org> * unposted: Functions/Prompts/.distfiles, diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index 58115f537..ae94bdf57 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -121,7 +121,7 @@ cd_group() { Cdset set1, set2; Cdstr str1, str2, *strp; - int num; + int num, len; for (set1 = cd_state.sets; set1; set1 = set1->next) { for (str1 = set1->strs; str1; str1 = str1->next) { @@ -129,6 +129,7 @@ cd_group() continue; num = 1; + len = str1->len; strp = &(str1->other); for (set2 = set1; set2; set2 = set2->next) @@ -138,10 +139,18 @@ cd_group() str1->kind = 1; str2->kind = 2; num++; + len += str2->len; *strp = str2; strp = &(str2->other); } *strp = NULL; + len += num * 2 + cd_state.slen; + + if (len >= columns) { + cd_state.groups = 0; + + return; + } if (num > 1) cd_state.groups++; else |