aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/lua/vim/_editor.lua4
-rw-r--r--runtime/lua/vim/treesitter/highlighter.lua2
-rw-r--r--runtime/scripts.vim4
3 files changed, 8 insertions, 2 deletions
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua
index 453aa6ac81..f7dcc3a81b 100644
--- a/runtime/lua/vim/_editor.lua
+++ b/runtime/lua/vim/_editor.lua
@@ -408,7 +408,9 @@ function vim.defer_fn(fn, timeout)
timeout,
0,
vim.schedule_wrap(function()
- timer:close()
+ if not timer:is_closing() then
+ timer:close()
+ end
fn()
end)
diff --git a/runtime/lua/vim/treesitter/highlighter.lua b/runtime/lua/vim/treesitter/highlighter.lua
index 453fed0576..d3da300e96 100644
--- a/runtime/lua/vim/treesitter/highlighter.lua
+++ b/runtime/lua/vim/treesitter/highlighter.lua
@@ -279,7 +279,7 @@ local function on_line_impl(self, buf, line)
return
end
- if state.iter == nil then
+ if state.iter == nil or state.next_row < line then
state.iter = highlighter_query:query():iter_captures(root_node, self.bufnr, line, root_end_row + 1)
end
diff --git a/runtime/scripts.vim b/runtime/scripts.vim
index dd47f65ba0..36763a4a82 100644
--- a/runtime/scripts.vim
+++ b/runtime/scripts.vim
@@ -202,6 +202,10 @@ if s:line1 =~# "^#!"
elseif s:name =~# 'gforth\>'
set ft=forth
+ " Icon
+ elseif s:name =~# 'icon\>'
+ set ft=icon
+
endif
unlet s:name