Fix access on vim.wo (#11517)

* Add more tests for vim.wo
This commit is contained in:
Ashkan Kiani
2019-12-07 03:34:02 -08:00
committed by GitHub
parent fbae9f8541
commit 0e6c6261e1
2 changed files with 11 additions and 6 deletions

View File

@@ -374,9 +374,9 @@ do
if winnr == nil and type(k) == "number" then
return new_win_opt_accessor(k)
end
return a.nvim_win_get_option(winnr or nil, k)
return a.nvim_win_get_option(winnr or 0, k)
end
local function set(k, v) return a.nvim_win_set_option(winnr or nil, k, v) end
local function set(k, v) return a.nvim_win_set_option(winnr or 0, k, v) end
return make_meta_accessor(get, set)
end
vim.wo = new_win_opt_accessor(nil)