From 662d38135beb8672412ecf24ebf0302e7304494d Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 26 Dec 2017 14:14:22 -0800 Subject: [PATCH] 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. --- src/grammar-registry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grammar-registry.js b/src/grammar-registry.js index b2c4129f7..b316bdbb0 100644 --- a/src/grammar-registry.js +++ b/src/grammar-registry.js @@ -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')) {