aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/indent.rs
diff options
context:
space:
mode:
authorGabriel Dinner-David2024-02-27 13:36:25 +0000
committerGitHub2024-02-27 13:36:25 +0000
commit26b3dc29be886c5a2ed1a5caaaf09eb730829c3e (patch)
tree7235f7dc402daaa9b3f5260d9a3f8aa166592ec6 /helix-core/src/indent.rs
parentf46a09ab4f945273c7baf32e58438b501914fabb (diff)
toggling of block comments (#4718)
Diffstat (limited to 'helix-core/src/indent.rs')
-rw-r--r--helix-core/src/indent.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs
index c29bb3a0..2a0a3876 100644
--- a/helix-core/src/indent.rs
+++ b/helix-core/src/indent.rs
@@ -1,10 +1,10 @@
use std::{borrow::Cow, collections::HashMap};
+use helix_stdx::rope::RopeSliceExt;
use tree_sitter::{Query, QueryCursor, QueryPredicateArg};
use crate::{
chars::{char_is_line_ending, char_is_whitespace},
- find_first_non_whitespace_char,
graphemes::{grapheme_width, tab_width_at},
syntax::{IndentationHeuristic, LanguageConfiguration, RopeProvider, Syntax},
tree_sitter::Node,
@@ -970,7 +970,7 @@ pub fn indent_for_newline(
let mut num_attempts = 0;
for line_idx in (0..=line_before).rev() {
let line = text.line(line_idx);
- let first_non_whitespace_char = match find_first_non_whitespace_char(line) {
+ let first_non_whitespace_char = match line.first_non_whitespace_char() {
Some(i) => i,
None => {
continue;