highlighter: Remove EmptyDef since it's superseeded by a nil check of SyntaxDef

This commit is contained in:
Jöran Karl 2023-09-20 20:25:09 +02:00
parent f386b29e16
commit 430da61314
2 changed files with 0 additions and 5 deletions

View file

@ -908,8 +908,6 @@ func (b *Buffer) UpdateRules() {
if b.SyntaxDef != nil {
b.Settings["filetype"] = b.SyntaxDef.FileType
}
} else {
b.SyntaxDef = &highlight.EmptyDef
}
if b.SyntaxDef != nil {

View file

@ -67,9 +67,6 @@ func combineLineMatch(src, dst LineMatch) LineMatch {
// A State represents the region at the end of a line
type State *region
// EmptyDef is an empty definition.
var EmptyDef = Def{nil, &rules{}}
// LineStates is an interface for a buffer-like object which can also store the states and matches for every line
type LineStates interface {
LineBytes(n int) []byte