Drop Coords.
This commit is contained in:
parent
61ef0a4e87
commit
5392b48268
2 changed files with 1 additions and 4 deletions
|
@ -288,9 +288,6 @@ impl State {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Coordinates are a 0-indexed line and column pair.
|
|
||||||
pub type Coords = (usize, usize); // line, col
|
|
||||||
|
|
||||||
/// Convert a character index to (line, column) coordinates.
|
/// Convert a character index to (line, column) coordinates.
|
||||||
pub fn coords_at_pos(text: &RopeSlice, pos: usize) -> Position {
|
pub fn coords_at_pos(text: &RopeSlice, pos: usize) -> Position {
|
||||||
let line = text.char_to_line(pos);
|
let line = text.char_to_line(pos);
|
||||||
|
|
|
@ -312,7 +312,7 @@ pub struct LanguageLayer {
|
||||||
tree: Option<Tree>,
|
tree: Option<Tree>,
|
||||||
}
|
}
|
||||||
|
|
||||||
use crate::state::{coords_at_pos, Coords};
|
use crate::state::coords_at_pos;
|
||||||
use crate::transaction::{ChangeSet, Operation};
|
use crate::transaction::{ChangeSet, Operation};
|
||||||
use crate::Tendril;
|
use crate::Tendril;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue