mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-01 21:51:40 +02:00
53329: adapt .zle.sgr for CSI sequences that use : instead of ;
This commit is contained in:
parent
45b79fa2cb
commit
4f3d69e2a0
2 changed files with 11 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
|||
2025-01-27 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 53329: Src/Modules/hlgroup.c: adapt .zle.sgr for CSI sequences
|
||||
that use : instead of ;
|
||||
|
||||
* github #128: GI <gi1242+zsh@gmail.com>:
|
||||
Completion/Unix/Command/_vim: Updated completion for neovim
|
||||
|
||||
|
|
|
@ -50,9 +50,14 @@ convertattr(char *attrstr, int sgr)
|
|||
char *c = s, *t = s - 1;
|
||||
|
||||
while (c[0] == '\033' && c[1] == '[') {
|
||||
c += 2;
|
||||
while (isdigit(*c) || *c == ';')
|
||||
*++t = *c++;
|
||||
for (c += 2; ; c++) {
|
||||
if (isdigit(*c))
|
||||
*++t = *c;
|
||||
else if (*c == ';' || *c == ':')
|
||||
*++t = ';';
|
||||
else
|
||||
break;
|
||||
}
|
||||
t++;
|
||||
if (*c != 'm')
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue