fix: replace table.unpack with direct indexing for Neovim 0.12 compat
This commit is contained in:
parent
3bfbb680fb
commit
bc435e499e
|
|
@ -7,7 +7,6 @@ G.opt.rnu = true
|
|||
G.opt.scrolloff = 999
|
||||
|
||||
-- 自动保存
|
||||
G.opt.autowrite = true
|
||||
G.opt.autowriteall = true
|
||||
|
||||
-- tab键
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ return {
|
|||
},
|
||||
config = function()
|
||||
local has_words_before = function()
|
||||
local unpack = table.unpack
|
||||
local line, col = unpack(G.api.nvim_win_get_cursor(0))
|
||||
local cursor = G.api.nvim_win_get_cursor(0)
|
||||
local line, col = cursor[1], cursor[2]
|
||||
return col ~= 0 and G.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match('%s') == nil
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue