1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-11 20:31:11 +01:00

fix for displaying matches in groups via _describe; go back to displaying one match per line when lines get too long (16582)

This commit is contained in:
Sven Wischnowsky 2002-02-07 08:40:01 +00:00
parent 0eefb1ec25
commit 9e0f74f07b
2 changed files with 16 additions and 1 deletions

View file

@ -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,

View file

@ -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