From 1e12fa57c2626fb0ee182764fa512920da5cb4dd Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 31 May 2022 11:40:54 +0200 Subject: nvim: cleaner cmp lua 5.1 workaround --- .config/nvim/lua/setup/nvim-cmp.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '.config/nvim/lua') diff --git a/.config/nvim/lua/setup/nvim-cmp.lua b/.config/nvim/lua/setup/nvim-cmp.lua index d3277d1..9e6ae05 100644 --- a/.config/nvim/lua/setup/nvim-cmp.lua +++ b/.config/nvim/lua/setup/nvim-cmp.lua @@ -1,6 +1,4 @@ -if not table.unpack then - table.unpack = unpack -end +table.unpack = table.unpack or unpack -- 5.1 compatibility local has_words_before = function() local line, col = table.unpack(vim.api.nvim_win_get_cursor(0)) -- cgit v1.2.3-70-g09d2