aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/options_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-07-06 14:39:50 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2018-07-21 13:21:58 +0200
commit1adb01c120d04bdbf25cd4ea6151ecd5f2de3a72 (patch)
tree1f906f5f77b77bc0beecb33320ceb4c15ff5c58e /test/functional/ui/options_spec.lua
parent2134396074d86c344aaf43c3b839fd38c499fb69 (diff)
downloadrneovim-1adb01c120d04bdbf25cd4ea6151ecd5f2de3a72.tar.gz
rneovim-1adb01c120d04bdbf25cd4ea6151ecd5f2de3a72.tar.bz2
rneovim-1adb01c120d04bdbf25cd4ea6151ecd5f2de3a72.zip
ui: use line-based rather than char-based updates in screen.c
Add ext_newgrid and ext_hlstate extensions. These use predefined highlights and line-segment based updates, for efficiency and simplicity.. The ext_hlstate extension in addition allows semantic identification of builtin and syntax highlights. Reimplement the old char-based updates in the remote UI layer, for compatibility. For the moment, this is still the default. The bulitin TUI uses the new line-based protocol. cmdline uses curwin cursor position when ext_cmdline is active.
Diffstat (limited to 'test/functional/ui/options_spec.lua')
-rw-r--r--test/functional/ui/options_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/ui/options_spec.lua b/test/functional/ui/options_spec.lua
index 62b08c0967..322a94763f 100644
--- a/test/functional/ui/options_spec.lua
+++ b/test/functional/ui/options_spec.lua
@@ -30,10 +30,15 @@ describe('ui receives option updates', function()
ext_popupmenu=false,
ext_tabline=false,
ext_wildmenu=false,
+ ext_newgrid=false,
+ ext_hlstate=false,
}
it("for defaults", function()
screen:attach()
+ -- NB: UI test suite can be run in both "newgrid" and legacy grid mode.
+ -- In both cases check that the received value is the one requested.
+ defaults.ext_newgrid = screen._options.ext_newgrid or false
screen:expect(function()
eq(defaults, screen.options)
end)
@@ -41,6 +46,7 @@ describe('ui receives option updates', function()
it("when setting options", function()
screen:attach()
+ defaults.ext_newgrid = screen._options.ext_newgrid or false
local changed = {}
for k,v in pairs(defaults) do
changed[k] = v
@@ -89,6 +95,7 @@ describe('ui receives option updates', function()
end
screen:attach({ext_cmdline=true, ext_wildmenu=true})
+ defaults.ext_newgrid = screen._options.ext_newgrid or false
changed.ext_cmdline = true
changed.ext_wildmenu = true
screen:expect(function()