Reset syntax highlighting on file rename

This commit is contained in:
Guldoman 2021-09-17 23:41:14 +02:00
parent c018ca3c60
commit 80a6b2245e
No known key found for this signature in database
GPG Key ID: C08A498EC7F1AFDD
1 changed files with 1 additions and 0 deletions

View File

@ -453,6 +453,7 @@ command.add(function() return view.hovered_item ~= nil end, {
for _, doc in ipairs(core.docs) do for _, doc in ipairs(core.docs) do
if doc.abs_filename and old_abs_filename == doc.abs_filename then 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:set_filename(filename, abs_filename) -- make doc point to the new filename
doc:reset_syntax()
break -- only first needed break -- only first needed
end end
end end