diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index bc8e65302..59ca2e3bd 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2948,7 +2948,7 @@ pub fn delete_char_backward(cx: &mut Context) { let line_start_pos = text.line_to_char(range.cursor_line(text)); // consider to delete by indent level if all characters before `pos` are indent units. let fragment = Cow::from(text.slice(line_start_pos..pos)); - if !fragment.is_empty() && fragment.chars().all(|ch| ch.is_whitespace()) { + if !fragment.is_empty() && fragment.chars().all(|ch| ch == ' ' || ch == '\t') { if text.get_char(pos.saturating_sub(1)) == Some('\t') { // fast path, delete one char (