mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
initial newline translation working
todo: cleanup, simplify handle columns
This commit is contained in:
parent
d951979159
commit
881c29192d
2 changed files with 262 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::TextUnit;
|
||||
use crate::{TextUnit, TextRange};
|
||||
use rustc_hash::FxHashMap;
|
||||
use superslice::Ext;
|
||||
|
||||
|
@ -120,6 +120,10 @@ impl LineIndex {
|
|||
|
||||
col
|
||||
}
|
||||
|
||||
pub fn newlines(&self) -> &[TextUnit] {
|
||||
&self.newlines[1..]
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue