Use zero as the minimum value of getGrammarPathScore

This way, we can determine if the grammar matches a buffer in any way by
checking for a positive score.
This commit is contained in:
Max Brunsfeld
2017-12-26 14:14:22 -08:00
parent 37cae78bc1
commit 662d38135b

View File

@@ -213,7 +213,7 @@ class GrammarRegistry {
if (process.platform === 'win32') { filePath = filePath.replace(/\\/g, '/') }
const pathComponents = filePath.toLowerCase().split(PATH_SPLIT_REGEX)
let pathScore = -1
let pathScore = 0
let customFileTypes
if (this.config.get('core.customFileTypes')) {