aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-12-08 22:24:00 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-12-08 23:44:24 -0300
commit86542c6fd0677a712c6b87049a04d8e67cda3e3d (patch)
treecd4e00ca6450acdb978936305fac40108543d201 /src/nvim/api/vim.c
parent07e569a25dba4bf6d9743102a34666964efb45cb (diff)
downloadrneovim-86542c6fd0677a712c6b87049a04d8e67cda3e3d.tar.gz
rneovim-86542c6fd0677a712c6b87049a04d8e67cda3e3d.tar.bz2
rneovim-86542c6fd0677a712c6b87049a04d8e67cda3e3d.zip
syntax: Use RGB/GUI attribute information for "abstract_ui"
Instead of using classic cterm color numbers and attributes, treat "abstract_ui" as a GUI: Pass rgb color numbers and gui attributes when the "highlight_set" UI method is called. The terminal UI will have to translate RGB color information to an appropriate color number, and the "term"/"cterm" :highlight keys will eventually be deprecated.
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index fe5fa6274b..eab79d970e 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -21,6 +21,7 @@
#include "nvim/message.h"
#include "nvim/eval.h"
#include "nvim/misc2.h"
+#include "nvim/syntax.h"
#include "nvim/term.h"
#include "nvim/getchar.h"
#include "nvim/os/input.h"
@@ -546,6 +547,11 @@ void vim_unsubscribe(uint64_t channel_id, String event)
channel_unsubscribe(channel_id, e);
}
+Integer vim_name_to_color(String name)
+{
+ return name_to_color((uint8_t *)name.data);
+}
+
Array vim_get_api_info(uint64_t channel_id)
{
Array rv = ARRAY_DICT_INIT;