From 1adb01c120d04bdbf25cd4ea6151ecd5f2de3a72 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Fri, 6 Jul 2018 14:39:50 +0200 Subject: 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. --- test/functional/ui/options_spec.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/functional/ui/options_spec.lua') 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() -- cgit