Set filetype to 'off' to disable completely

Ref #1427
This commit is contained in:
Zachary Yedidia
2020-01-02 19:00:42 -05:00
parent 2855ae204c
commit ddc8bf455e
4 changed files with 33 additions and 23 deletions

View File

@@ -453,8 +453,11 @@ func (b *Buffer) UpdateRules() {
if !b.Type.Syntax {
return
}
syntaxFile := ""
ft := b.Settings["filetype"].(string)
if ft == "off" {
return
}
syntaxFile := ""
var header *highlight.Header
for _, f := range config.ListRuntimeFiles(config.RTSyntaxHeader) {
data, err := f.Data()