diff options
author | Matthieu Coudron <mattator@gmail.com> | 2020-06-06 02:05:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-06 02:05:49 +0200 |
commit | 33dafc4f0f21f763dac8f6bdbd27117666f908c5 (patch) | |
tree | 179301040b52babddbe60001bc5c9b467edc310a /src/nvim/syntax.c | |
parent | fca471d8e2573c2351151051a2d2c6eee0b2243b (diff) | |
parent | 9538a7895cb6af2312a39c4c0710ace638309914 (diff) | |
download | rneovim-33dafc4f0f21f763dac8f6bdbd27117666f908c5.tar.gz rneovim-33dafc4f0f21f763dac8f6bdbd27117666f908c5.tar.bz2 rneovim-33dafc4f0f21f763dac8f6bdbd27117666f908c5.zip |
Merge pull request #12413 from janlazo/vim-8.2.0089
[RDY]vim-patch:8.0.1564,8.1.{917,1895,2018,2335},8.2.{89,491,873,892,905}
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index ef4dfb3caa..f3b05c3961 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -7444,6 +7444,8 @@ static int syn_add_group(char_u *name) return 0; } + char_u *const name_up = vim_strsave_up(name); + // Append another syntax_highlight entry. struct hl_group* hlgp = GA_APPEND_VIA_PTR(struct hl_group, &highlight_ga); memset(hlgp, 0, sizeof(*hlgp)); @@ -7452,7 +7454,7 @@ static int syn_add_group(char_u *name) hlgp->sg_rgb_fg = -1; hlgp->sg_rgb_sp = -1; hlgp->sg_blend = -1; - hlgp->sg_name_u = vim_strsave_up(name); + hlgp->sg_name_u = name_up; return highlight_ga.ga_len; /* ID is index plus one */ } |