mirror of
https://github.com/helix-editor/helix.git
synced 2024-10-26 19:27:50 +03:00
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>
This commit is contained in:
parent
8adf0c1b3a
commit
6bb2298391
@ -398,6 +398,9 @@ pub fn indent_query(&self) -> Option<&Query> {
|
||||
.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()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user