diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-09-14 16:07:00 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-09-14 16:12:38 -0400 |
commit | c971a231e21fbf9c525a589f56c24cafeeedff7b (patch) | |
tree | 79a3aac355abe38494469e521157b3a505e6cb9a /src | |
parent | 1a718f4fae82ac677e868451a8b79a70bd74a6a0 (diff) | |
download | rneovim-c971a231e21fbf9c525a589f56c24cafeeedff7b.tar.gz rneovim-c971a231e21fbf9c525a589f56c24cafeeedff7b.tar.bz2 rneovim-c971a231e21fbf9c525a589f56c24cafeeedff7b.zip |
vim-patch:8.0.1134: superfluous call to syn_get_final_id()
Problem: Superfluous call to syn_get_final_id().
Solution: Remove it. (Ken Takata)
https://github.com/vim/vim/commit/76301956f0c079d893cfd927b11456328bed4f9b
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/syntax.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 13fcad71fa..5a61238d8c 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -7327,6 +7327,7 @@ static void set_hl_attr(int idx) /// @param highlight name e.g. 'Cursor', 'Normal' /// @return the highlight id, else 0 if \p name does not exist int syn_name2id(const char_u *name) + FUNC_ATTR_NONNULL_ALL { int i; char_u name_u[200]; @@ -7345,12 +7346,13 @@ int syn_name2id(const char_u *name) /// Lookup a highlight group name and return its attributes. /// Return zero if not found. -int syn_name2attr(char_u *name) +int syn_name2attr(const char_u *name) + FUNC_ATTR_NONNULL_ALL { int id = syn_name2id(name); if (id != 0) { - return syn_id2attr(syn_get_final_id(id)); + return syn_id2attr(id); } return 0; } |