Skip to content

Commit

Permalink
api/ext_tabline: Return tabpage opaque handle.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmk committed Apr 26, 2017
1 parent 72bfb5b commit 8db9e44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions test/functional/ui/tabline_spec.lua
@@ -1,18 +1,19 @@
local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local clear, command, eq = helpers.clear, helpers.command, helpers.eq
local nvim = helpers.nvim

describe('ui/tabline', function()
local screen
local tabs, curtab
local event_tabs, event_curtab

before_each(function()
clear()
screen = Screen.new(25, 5)
screen:attach({rgb=true, ext_tabline=true})
screen:set_on_event_handler(function(name, data)
if name == "tabline_update" then
curtab, tabs = unpack(data)
event_curtab, event_tabs = unpack(data)
end
end)
end)
Expand All @@ -23,20 +24,21 @@ describe('ui/tabline', function()

describe('externalized', function()
it('publishes UI events', function()
local expected = {
{tab = 1, name = '[No Name]'},
{tab = 2, name = 'another-tab'},
}
command("tabedit another-tab")

local expected_tabs = {
{tab = { id = 1 }, name = '[No Name]'},
{tab = { id = 2 }, name = 'another-tab'},
}
screen:expect([[
^ |
~ |
~ |
~ |
|
]], nil, nil, function()
eq(2, curtab)
eq(expected, tabs)
eq(2, event_curtab)
eq(expected_tabs, event_tabs)
end)

command("tabNext")
Expand All @@ -47,8 +49,8 @@ describe('ui/tabline', function()
~ |
|
]], nil, nil, function()
eq(1, curtab)
eq(expected, tabs)
eq(1, event_curtab)
eq(expected_tabs, event_tabs)
end)

end)
Expand Down
2 changes: 1 addition & 1 deletion third-party/cmake/BuildLuarocks.cmake
Expand Up @@ -167,7 +167,7 @@ if(USE_BUNDLED_BUSTED)

add_custom_command(OUTPUT ${HOSTDEPS_LIB_DIR}/luarocks/rocks/nvim-client
COMMAND ${LUAROCKS_BINARY}
ARGS build https://raw.githubusercontent.com/neovim/lua-client/0.0.1-25/nvim-client-0.0.1-25.rockspec ${LUAROCKS_BUILDARGS}
ARGS build https://raw.githubusercontent.com/neovim/lua-client/0.0.1-26/nvim-client-0.0.1-26.rockspec ${LUAROCKS_BUILDARGS}
DEPENDS luv)
add_custom_target(nvim-client
DEPENDS ${HOSTDEPS_LIB_DIR}/luarocks/rocks/nvim-client)
Expand Down

0 comments on commit 8db9e44

Please sign in to comment.