From c54f81eca123cf12ccf10b1562f6ae03d42c1528 Mon Sep 17 00:00:00 2001 From: wongxy Date: Sat, 16 Apr 2022 11:27:40 +0800 Subject: [PATCH] fix: use api funciton to set scoped option it's not correct when enter a new tab before --- plugin/virtcolumn.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/virtcolumn.lua b/plugin/virtcolumn.lua index 1856881..87a65bc 100644 --- a/plugin/virtcolumn.lua +++ b/plugin/virtcolumn.lua @@ -47,10 +47,10 @@ local function _refresh() end local items = vim.b.virtcolumn_items or vim.w.virtcolumn_items - local local_cc = vim.wo.cc + local local_cc = api.nvim_get_option_value("cc", { scope = "local" }) if not items or local_cc ~= "" then items = parse_items(local_cc) - vim.wo.cc = "" + api.nvim_set_option_value("cc", "", { scope = "local" }) end vim.b.virtcolumn_items = items vim.w.virtcolumn_items = items