From 80a6b2245ea36d1b2abfb3dbb796f43d322a28e4 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Fri, 17 Sep 2021 23:41:14 +0200 Subject: [PATCH] Reset syntax highlighting on file rename --- data/plugins/treeview.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/data/plugins/treeview.lua b/data/plugins/treeview.lua index 84d5dd28..26481398 100644 --- a/data/plugins/treeview.lua +++ b/data/plugins/treeview.lua @@ -453,6 +453,7 @@ command.add(function() return view.hovered_item ~= nil end, { for _, doc in ipairs(core.docs) do if doc.abs_filename and old_abs_filename == doc.abs_filename then doc:set_filename(filename, abs_filename) -- make doc point to the new filename + doc:reset_syntax() break -- only first needed end end