fix: replace table.unpack with direct indexing for Neovim 0.12 compat

This commit is contained in:
QQ 2026-06-11 15:28:19 +08:00
parent 3bfbb680fb
commit bc435e499e
2 changed files with 2 additions and 3 deletions

View File

@ -7,7 +7,6 @@ G.opt.rnu = true
G.opt.scrolloff = 999
-- 自动保存
G.opt.autowrite = true
G.opt.autowriteall = true
-- tab键

View File

@ -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