lib/ruby_lsp/requests/prepare_rename.rb in ruby-lsp-0.23.1 vs lib/ruby_lsp/requests/prepare_rename.rb in ruby-lsp-0.23.2
- old
+ new
@@ -22,10 +22,10 @@
@position = T.let(position, T::Hash[Symbol, Integer])
end
sig { override.returns(T.nilable(Interface::Range)) }
def perform
- char_position = @document.create_scanner.find_char_position(@position)
+ char_position, _ = @document.find_index_by_position(@position)
node_context = RubyDocument.locate(
@document.parse_result.value,
char_position,
node_types: [Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::ConstantPathTargetNode],