comparison src/term.c @ 16961:43c942a1938c v8.1.1481

patch 8.1.1481: length for two-digit rgb termresponse is off by one commit https://github.com/vim/vim/commit/12e71eb8a89bdfe1def5854fd7478e8899801b44 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 6 15:19:31 2019 +0200 patch 8.1.1481: length for two-digit rgb termresponse is off by one Problem: Length for two-digit rgb termresponse is off by one. Solution: Adjust the length. (closes https://github.com/vim/vim/issues/4494)
author Bram Moolenaar <Bram@vim.org>
date Thu, 06 Jun 2019 15:30:06 +0200
parents 1c264ca8f2e8
children b2918bd457cb
comparison
equal deleted inserted replaced
16960:3acf77ec29e4 16961:43c942a1938c
4988 { 4988 {
4989 int is_bg = argp[1] == '1'; 4989 int is_bg = argp[1] == '1';
4990 int is_4digit = i - j >= 21 && tp[j + 11] == '/' 4990 int is_4digit = i - j >= 21 && tp[j + 11] == '/'
4991 && tp[j + 16] == '/'; 4991 && tp[j + 16] == '/';
4992 4992
4993 if (i - j >= 14 && STRNCMP(tp + j + 3, "rgb:", 4) == 0 4993 if (i - j >= 15 && STRNCMP(tp + j + 3, "rgb:", 4) == 0
4994 && (is_4digit 4994 && (is_4digit
4995 || (tp[j + 9] == '/' && tp[i + 12 == '/']))) 4995 || (tp[j + 9] == '/' && tp[i + 12 == '/'])))
4996 { 4996 {
4997 char_u *tp_r = tp + j + 7; 4997 char_u *tp_r = tp + j + 7;
4998 char_u *tp_g = tp + j + (is_4digit ? 12 : 10); 4998 char_u *tp_g = tp + j + (is_4digit ? 12 : 10);