From b1ae775de618e3e87954a88d533ec17bbef41cdf Mon Sep 17 00:00:00 2001 From: emmanueltouzery Date: Tue, 7 Feb 2023 09:37:14 +0100 Subject: [PATCH] fix(treesitter): really backup spelloptions (#22145) see 0887ad1cbb050d2bc6169ad46aa07cf42c90493f for the original commit on master, and 80bbba94d669e3fdda2edddf1c37acda1cfed968 for the backport on the branch, which forgot to backup the original setting value. --- runtime/lua/vim/treesitter/highlighter.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/lua/vim/treesitter/highlighter.lua b/runtime/lua/vim/treesitter/highlighter.lua index ce6caa5050..d77a0d0d03 100644 --- a/runtime/lua/vim/treesitter/highlighter.lua +++ b/runtime/lua/vim/treesitter/highlighter.lua @@ -88,6 +88,8 @@ function TSHighlighter.new(tree, opts) end end + self.orig_spelloptions = vim.bo[self.bufnr].spelloptions + vim.bo[self.bufnr].syntax = '' vim.b[self.bufnr].ts_highlight = true