diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-14 16:02:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-14 16:02:15 -0700 |
commit | db550ac995652133fed0d16964f2cef2c49dbc82 (patch) | |
tree | 56ca855e154e56adb2e08ed91810aceaf41dfd5b /src/nvim/syntax.c | |
parent | fc27dc98d74f0e25bf1dc2cb8ff399b05ccd6f2c (diff) | |
parent | cccfc1b60387b31a878e33010c9d61f339e68d63 (diff) | |
download | rneovim-db550ac995652133fed0d16964f2cef2c49dbc82.tar.gz rneovim-db550ac995652133fed0d16964f2cef2c49dbc82.tar.bz2 rneovim-db550ac995652133fed0d16964f2cef2c49dbc82.zip |
Merge #11020 from janlazo/vim-8.1.0289
vim-patch:8.0.{1134,1148},8.1.{212,289,2028}
fix #10270
Diffstat (limited to 'src/nvim/syntax.c')
-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; } |