fix(Layer): `buffer = 0` in mapping

pull/17/head release/3.1.1
Iron-E 2 years ago
parent 31a79a8f54
commit 49246bac2e
No known key found for this signature in database
GPG Key ID: 19B71B7B7B021D22

@ -1,8 +1,8 @@
--- Normalizes a `buffer = true|false` argument into a number.
--- Normalizes a `buffer = true|false|0` argument into a number.
--- @param buffer boolean|number the argument to normalize
--- @return nil|number
local function normalize_buffer(buffer)
if buffer == true then
if buffer == true or buffer == 0 then
return vim.api.nvim_get_current_buf()
elseif buffer == false then
return nil

Loading…
Cancel
Save