diff options
author | Triton171 | 2022-04-01 02:27:06 +0000 |
---|---|---|
committer | GitHub | 2022-04-01 02:27:06 +0000 |
commit | 6bb229839149742682d943a90f728e334c3cc560 (patch) | |
tree | 30dca65c7a5af121ba7cf69a7cb3dfd0be5ccae9 /helix-core | |
parent | 8adf0c1b3a7a2173c80a86da5d435288bab456de (diff) |
Fix an issue that caused an empty indentation query to be used instead of using the fallback method of copying the indentation from the current line. (#1908)
Co-authored-by: Triton171 <triton0171@gmail.com>
Diffstat (limited to 'helix-core')
-rw-r--r-- | helix-core/src/syntax.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index dde7e90c..e736b370 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -398,6 +398,9 @@ impl LanguageConfiguration { .get_or_init(|| { let lang_name = self.language_id.to_ascii_lowercase(); let query_text = read_query(&lang_name, "indents.scm"); + if query_text.is_empty() { + return None; + } let lang = self.highlight_config.get()?.as_ref()?.language; Query::new(lang, &query_text).ok() }) |