mirror of
https://github.com/git/git.git
synced 2026-08-07 08:31:51 +00:00
Merge branch 'mm/sideband-ansi-sgr-colon-fix'
The sideband demultiplexer has been updated to recognize ANSI SGR escape sequences that use colon-separated subfields (e.g., for 256-color or true-color codes). * mm/sideband-ansi-sgr-colon-fix: sideband: allow ANSI SGR with colon-separated subfields
This commit is contained in:
@@ -163,6 +163,10 @@ static int handle_ansi_sequence(struct strbuf *dest, const char *src, int n)
|
||||
*
|
||||
* ESC [ [<n> [; <n>]*] m
|
||||
*
|
||||
* where <n> can be either zero-length, or a decimal number, or a
|
||||
* series of decimal numbers separated by a colon (for 256-color or
|
||||
* true-color codes).
|
||||
*
|
||||
* These are part of the Select Graphic Rendition sequences which
|
||||
* contain more than just color sequences, for more details see
|
||||
* https://en.wikipedia.org/wiki/ANSI_escape_code#SGR.
|
||||
@@ -210,7 +214,7 @@ static int handle_ansi_sequence(struct strbuf *dest, const char *src, int n)
|
||||
strbuf_add(dest, src, i + 1);
|
||||
return i;
|
||||
}
|
||||
if (!isdigit(src[i]) && src[i] != ';')
|
||||
if (!isdigit(src[i]) && src[i] != ':' && src[i] != ';')
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user