diff options
author | Lewis Russell <lewis6991@gmail.com> | 2022-03-18 04:47:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 12:47:08 +0800 |
commit | 00effff56944d5b59440dcdb5e3496d49a76d3e2 (patch) | |
tree | 09b28a8a44a8e98a58f4ced7a5e5a249c57ac072 /src/nvim/api/private/helpers.c | |
parent | c1b98cfa5e94c28a792af67cf5bc53ef2c380681 (diff) | |
download | rneovim-00effff56944d5b59440dcdb5e3496d49a76d3e2.tar.gz rneovim-00effff56944d5b59440dcdb5e3496d49a76d3e2.tar.bz2 rneovim-00effff56944d5b59440dcdb5e3496d49a76d3e2.zip |
vim-patch:8.1.1693: syntax coloring and highlighting is in one big file (#17721)
Problem: Syntax coloring and highlighting is in one big file.
Solution: Move the highlighting to a separate file. (Yegappan Lakshmanan,
closes vim/vim#4674)
https://github.com/vim/vim/commit/f9cc9f209ede9f15959e4c2351e970477c139614
Name the new file highlight_group.c instead.
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index 9f41393c6b..88954a1aa2 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -22,6 +22,7 @@ #include "nvim/extmark.h" #include "nvim/fileio.h" #include "nvim/getchar.h" +#include "nvim/highlight_group.h" #include "nvim/lib/kvec.h" #include "nvim/lua/executor.h" #include "nvim/map.h" @@ -32,7 +33,6 @@ #include "nvim/msgpack_rpc/helpers.h" #include "nvim/option.h" #include "nvim/option_defs.h" -#include "nvim/syntax.h" #include "nvim/ui.h" #include "nvim/version.h" #include "nvim/vim.h" @@ -1293,7 +1293,7 @@ int object_to_hl_id(Object obj, const char *what, Error *err) { if (obj.type == kObjectTypeString) { String str = obj.data.string; - return str.size ? syn_check_group(str.data, (int)str.size) : 0; + return str.size ? syn_check_group(str.data, str.size) : 0; } else if (obj.type == kObjectTypeInteger) { return MAX((int)obj.data.integer, 0); } else { @@ -1327,7 +1327,7 @@ HlMessage parse_hl_msg(Array chunks, Error *err) String hl = chunk.items[1].data.string; if (hl.size > 0) { // TODO(bfredl): use object_to_hl_id and allow integer - int hl_id = syn_check_group(hl.data, (int)hl.size); + int hl_id = syn_check_group(hl.data, hl.size); attr = hl_id > 0 ? syn_id2attr(hl_id) : 0; } } |