Skip to content

Commit

Permalink
Fix an issue that caused an empty indentation query to be used instea…
Browse files Browse the repository at this point in the history
…d of using the fallback method of copying the indentation from the current line. (#1908)

Co-authored-by: Triton171 <[email protected]>
  • Loading branch information
Triton171 and Triton171 committed Apr 1, 2022
1 parent 8adf0c1 commit 6bb2298
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helix-core/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
Expand Down

0 comments on commit 6bb2298

Please sign in to comment.