From 4b4740a322c1ac2fd48eb83d605a9f4eb4251fc8 Mon Sep 17 00:00:00 2001 From: Nikita Revenco <154856872+nikitarevenco@users.noreply.github.com> Date: Fri, 8 Nov 2024 00:59:09 +0000 Subject: [PATCH] fix: rename broken variable --- helix-core/src/textobject.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/helix-core/src/textobject.rs b/helix-core/src/textobject.rs index f2a8f30e1..c5f3b0778 100644 --- a/helix-core/src/textobject.rs +++ b/helix-core/src/textobject.rs @@ -3,7 +3,9 @@ use std::fmt::Display; use ropey::RopeSlice; use tree_sitter::{Node, QueryCursor}; -use crate::chars::{categorize_char, char_is_subword_delimiter, char_is_whitespace, CharCategory}; +use crate::chars::{ + categorize_char, char_is_subword_textobj_delimiter, char_is_whitespace, CharCategory, +}; use crate::graphemes::{next_grapheme_boundary, prev_grapheme_boundary}; use crate::line_ending::rope_is_line_ending; use crate::movement::{is_sub_word_boundary, Direction}; @@ -135,7 +137,7 @@ pub fn textobject_word( (TextObject::Around, true) => { let underscores_count_right = slice .chars_at(word_end) - .take_while(|c| char_is_subword_delimiter(*c)) + .take_while(|c| char_is_subword_textobj_delimiter(*c)) .count(); if underscores_count_right > 0 { @@ -144,7 +146,8 @@ pub fn textobject_word( let underscore_count_left = { let mut iter = slice.chars_at(word_start); iter.reverse(); - iter.take_while(|c| char_is_subword_delimiter(*c)).count() + iter.take_while(|c| char_is_subword_textobj_delimiter(*c)) + .count() }; Range::new(word_start - underscore_count_left, word_end) }