mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-22 04:27:33 +00:00
12 lines
303 B
Rust
12 lines
303 B
Rust
![]() |
use ra_db::SyntaxDatabase;
|
||
|
|
||
|
use crate::{
|
||
|
TextRange, FileRange,
|
||
|
db::RootDatabase,
|
||
|
};
|
||
|
|
||
|
pub(crate) fn extend_selection(db: &RootDatabase, frange: FileRange) -> TextRange {
|
||
|
let file = db.source_file(frange.file_id);
|
||
|
ra_editor::extend_selection(&file, frange.range).unwrap_or(frange.range)
|
||
|
}
|