From e3c18c7072eebabaa706008b7fa42c73ec2ff83e Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 13 Mar 2023 03:04:43 +0000 Subject: CTAN sync 202303130304 --- support/texlab/src/features/rename/command.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'support/texlab/src/features/rename') diff --git a/support/texlab/src/features/rename/command.rs b/support/texlab/src/features/rename/command.rs index 5610b2f7ee..1e5f2ff0ca 100644 --- a/support/texlab/src/features/rename/command.rs +++ b/support/texlab/src/features/rename/command.rs @@ -1,7 +1,7 @@ use rowan::{TextRange, TextSize}; use rustc_hash::FxHashMap; -use crate::util::cursor::CursorContext; +use crate::{syntax::latex, util::cursor::CursorContext}; use super::{Indel, Params, RenameResult}; @@ -19,7 +19,7 @@ pub(super) fn rename(context: &CursorContext) -> Option { let edits = root .descendants_with_tokens() .filter_map(|element| element.into_token()) - .filter(|token| token.kind().is_command_name() && token.text() == name) + .filter(|token| token.kind() == latex::COMMAND_NAME && token.text() == name) .map(|token| { let range = token.text_range(); Indel { -- cgit v1.2.3