Make set filetype off work as expected (#3216)

Disable syntax highlighting after setting filetype to `off`.
This commit is contained in:
Dmytro Maluka 2024-03-25 19:38:33 +01:00 committed by GitHub
parent d96f060b4c
commit 20bf7096b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -690,6 +690,8 @@ func (b *Buffer) UpdateRules() {
}
ft := b.Settings["filetype"].(string)
if ft == "off" {
b.ClearMatches()
b.SyntaxDef = nil
return
}