aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/screen.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-07-26 21:27:41 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2018-08-13 13:35:35 +0200
commitfa4c2601000df2d792b0de865da3ac8c43ab723f (patch)
tree9048f5e4bf1a7aa06c24eade3f7b8f27fd9cacca /test/functional/ui/screen.lua
parentfab555e59c627b07e8a2d229d95737be7d6ce666 (diff)
downloadrneovim-fa4c2601000df2d792b0de865da3ac8c43ab723f.tar.gz
rneovim-fa4c2601000df2d792b0de865da3ac8c43ab723f.tar.bz2
rneovim-fa4c2601000df2d792b0de865da3ac8c43ab723f.zip
cursor_shape: use attribute ids instead of syntax ids
As attribute ids is the convention in the UI protocol Also remove non-threadsafe calls in tui.c to syntax module.
Diffstat (limited to 'test/functional/ui/screen.lua')
-rw-r--r--test/functional/ui/screen.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index c40b2210ff..872a9d3200 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -386,6 +386,17 @@ end
function Screen:_handle_mode_info_set(cursor_style_enabled, mode_info)
self._cursor_style_enabled = cursor_style_enabled
+ for _, item in pairs(mode_info) do
+ -- attr IDs are not stable, but their value should be
+ if item.attr_id ~= nil then
+ item.attr = self._attr_table[item.attr_id][1]
+ item.attr_id = nil
+ end
+ if item.attr_id_lm ~= nil then
+ item.attr_lm = self._attr_table[item.attr_id_lm][1]
+ item.attr_id_lm = nil
+ end
+ end
self._mode_info = mode_info
end