Mercurial > vim
changeset 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 | 3acf77ec29e4 |
children | 70da6e496fc1 |
files | src/term.c src/version.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/term.c +++ b/src/term.c @@ -4990,7 +4990,7 @@ check_termcode( int is_4digit = i - j >= 21 && tp[j + 11] == '/' && tp[j + 16] == '/'; - if (i - j >= 14 && STRNCMP(tp + j + 3, "rgb:", 4) == 0 + if (i - j >= 15 && STRNCMP(tp + j + 3, "rgb:", 4) == 0 && (is_4digit || (tp[j + 9] == '/' && tp[i + 12 == '/']))) {