mirror of
https://github.com/neovim/neovim.git
synced 2026-09-03 04:43:48 +00:00
libvterm reads the first three sub-parameters of an SGR 38:2 or 48:2 sequence as R:G:B, so a colour space id shifts the channels: the empty slot becomes red via CSI_ARG_MISSING truncating to 255, and green and blue move over one. Skip the colour space id when the colon-separated group holds more than three arguments. The group length comes from CSI_ARG_HAS_MORE rather than the raw argument count, so a following semicolon-separated parameter is not consumed.