mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 23:05:41 +00:00
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.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user