From 111d34849a0670842b56c17c3922dbf0576bb39b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 21 Sep 2019 11:07:07 -0400 Subject: vim-patch:8.0.1621: using invalid default value for highlight attribute Problem: Using invalid default value for highlight attribute. Solution: Use zero instead of -1. https://github.com/vim/vim/commit/6185903e3d07eb53326fc1403fc2de97ca31b775 --- src/nvim/syntax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/syntax.c') diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 5a61238d8c..675d484d67 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -7569,8 +7569,8 @@ void highlight_changed(void) { int id; char_u userhl[30]; // use 30 to avoid compiler warning - int id_SNC = -1; int id_S = -1; + int id_SNC = 0; int hlcnt; need_highlight_changed = FALSE; -- cgit From cb252071718a58c2d9747177ebeb81ff1210ddd1 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 17 Jun 2019 22:35:07 +0200 Subject: vim-patch:8.0.0914: highlight attributes are always combined (#10256) Problem: Highlight attributes are always combined. Solution: Add the 'nocombine' value to replace attributes instead of combining them. (scauligi, closes vim/vim#1963) https://github.com/vim/vim/commit/0cd2a94a4030f6bd12eaec44db92db108e33c913 Closes https://github.com/neovim/neovim/pull/10256. --- src/nvim/syntax.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/syntax.c') diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 675d484d67..ac8ace9fff 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -116,10 +116,10 @@ static int include_link = 0; /* when 2 include "nvim/link" and "clear" */ /// following names, separated by commas (but no spaces!). static char *(hl_name_table[]) = { "bold", "standout", "underline", "undercurl", - "italic", "reverse", "inverse", "strikethrough", "NONE" }; + "italic", "reverse", "inverse", "strikethrough", "nocombine", "NONE" }; static int hl_attr_table[] = { HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_UNDERCURL, HL_ITALIC, HL_INVERSE, - HL_INVERSE, HL_STRIKETHROUGH, 0 }; + HL_INVERSE, HL_STRIKETHROUGH, HL_NOCOMBINE, 0 }; // The patterns that are being searched for are stored in a syn_pattern. // A match item consists of one pattern. -- cgit From 1c43fb1d51cd76ccca142e73d72af56f6fb0461d Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 2 Nov 2019 14:36:00 -0400 Subject: syntax: zero-init local structs Fix https://neovim.io/doc/reports/clang/report-ee5dbd.html#EndPath --- src/nvim/syntax.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/nvim/syntax.c') diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index ac8ace9fff..bdbc09a87a 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -2460,11 +2460,8 @@ update_si_end( int force /* when TRUE overrule a previous end */ ) { - lpos_T startpos; - lpos_T endpos; lpos_T hl_endpos; lpos_T end_endpos; - int end_idx; /* return quickly for a keyword */ if (sip->si_idx < 0) @@ -2480,9 +2477,12 @@ update_si_end( * We need to find the end of the region. It may continue in the next * line. */ - end_idx = 0; - startpos.lnum = current_lnum; - startpos.col = startcol; + int end_idx = 0; + lpos_T startpos = { + .lnum = current_lnum, + .col = startcol, + }; + lpos_T endpos = { 0 }; find_endpos(sip->si_idx, &startpos, &endpos, &hl_endpos, &(sip->si_flags), &end_endpos, &end_idx, sip->si_extmatch); -- cgit From 001e69cd4602e84219fd7cfd8ade62f0cb24097c Mon Sep 17 00:00:00 2001 From: Brian Wignall Date: Tue, 26 Nov 2019 07:15:14 -0500 Subject: doc: fix typos close #11459 --- src/nvim/syntax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/syntax.c') diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index bdbc09a87a..61ee225eba 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -7316,7 +7316,7 @@ static void set_hl_attr(int idx) sgp->sg_attr = hl_get_syn_attr(idx+1, at_en); - // a cursor style uses this syn_id, make sure its atribute is updated. + // a cursor style uses this syn_id, make sure its attribute is updated. if (cursor_mode_uses_syn_id(idx+1)) { ui_mode_info_set(); } -- cgit