mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
switch to FileRange
This commit is contained in:
parent
02924174bb
commit
fd33c89207
4 changed files with 37 additions and 15 deletions
|
@ -14,9 +14,11 @@ mod db;
|
|||
mod imp;
|
||||
mod completion;
|
||||
mod symbol_index;
|
||||
mod syntax_highlighting;
|
||||
pub mod mock_analysis;
|
||||
|
||||
mod extend_selection;
|
||||
mod syntax_highlighting;
|
||||
|
||||
use std::{fmt, sync::Arc};
|
||||
|
||||
use rustc_hash::FxHashMap;
|
||||
|
@ -277,8 +279,8 @@ impl Analysis {
|
|||
pub fn file_line_index(&self, file_id: FileId) -> Arc<LineIndex> {
|
||||
self.imp.file_line_index(file_id)
|
||||
}
|
||||
pub fn extend_selection(&self, file: &SourceFileNode, range: TextRange) -> TextRange {
|
||||
ra_editor::extend_selection(file, range).unwrap_or(range)
|
||||
pub fn extend_selection(&self, frange: FileRange) -> TextRange {
|
||||
extend_selection::extend_selection(&self.imp.db, frange)
|
||||
}
|
||||
pub fn matching_brace(&self, file: &SourceFileNode, offset: TextUnit) -> Option<TextUnit> {
|
||||
ra_editor::matching_brace(file, offset)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue