diff --git a/lua/nvim-gps/init.lua b/lua/nvim-gps/init.lua index 30a27bb..96797b1 100644 --- a/lua/nvim-gps/init.lua +++ b/lua/nvim-gps/init.lua @@ -327,6 +327,9 @@ function M.get_data() if vim.fn.has("nvim-0.7") then text = vim.treesitter.query.get_node_text(capture_node, 0) + if text == nil then + return data_cache_value + end text = string.gsub(text, "%s+", ' ') else text = utils.get_node_text()