on master help sign in
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>

commit6bb229839149742682d943a90f728e334c3cc560 authorTriton171 <daniel.ebert@protonmail.com> dateFri 1 Apr 2022, 04:27 (5 years ago) parent8adf0c1
1 file changed+3
helix-core/src/syntax.rs+3
helix-core/src/syntax.rs+3
@@ -398,6 +398,9 @@ impl LanguageConfiguration {
398398 .get_or_init(|| {
399399 let lang_name = self.language_id.to_ascii_lowercase();
400400 let query_text = read_query(&lang_name, "indents.scm");
401+ if query_text.is_empty() {
402+ return None;
403+ }
401404 let lang = self.highlight_config.get()?.as_ref()?.language;
402405 Query::new(lang, &query_text).ok()
403406 })