Skip to content

Commit

Permalink
Make set filetype off work as expected
Browse files Browse the repository at this point in the history
Disable syntax highlighting after setting filetype to `off`.
  • Loading branch information
dmaluka committed Mar 25, 2024
1 parent c2c2b2a commit 21ecce9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/buffer/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,8 @@ func (b *Buffer) UpdateRules() {
}
ft := b.Settings["filetype"].(string)
if ft == "off" {
b.ClearMatches()
b.SyntaxDef = nil
return
}

Expand Down

0 comments on commit 21ecce9

Please sign in to comment.