on master help sign in
Drop Coords.
5392b48Blaž Hrastnik
helix-core/src/state.rs−3
@@ -288,9 +288,6 @@ impl State {
288 }
288 }
289}
289}
290
290
291−/// Coordinates are a 0-indexed line and column pair.
292−pub type Coords = (usize, usize); // line, col
293−
294/// Convert a character index to (line, column) coordinates.
291/// Convert a character index to (line, column) coordinates.
295pub fn coords_at_pos(text: &RopeSlice, pos: usize) -> Position {
292pub fn coords_at_pos(text: &RopeSlice, pos: usize) -> Position {
296 let line = text.char_to_line(pos);
293 let line = text.char_to_line(pos);
helix-core/src/syntax.rs+1−1
@@ -312,7 +312,7 @@ pub struct LanguageLayer {
312 tree: Option<Tree>,
312 tree: Option<Tree>,
313}
313}
314
314
315−use crate::state::{coords_at_pos, Coords};
315+use crate::state::coords_at_pos;
316use crate::transaction::{ChangeSet, Operation};
316use crate::transaction::{ChangeSet, Operation};
317use crate::Tendril;
317use crate::Tendril;
318
318