Drop Coords.
commit5392b4826856e5e50653587ed5a13aef86805401
authorBlaž Hrastnik <blaz@mxxn.io>
dateTue 6 Oct 2020, 17:30 (6 years ago)
parent61ef0a4
helix-core/src/state.rs−3
@@ -288,9 +288,6 @@ impl State {
288288 }
289289}
290290
291−/// Coordinates are a 0-indexed line and column pair.
292−pub type Coords = (usize, usize); // line, col
293−
294291/// Convert a character index to (line, column) coordinates.
295292pub fn coords_at_pos(text: &RopeSlice, pos: usize) -> Position {
296293 let line = text.char_to_line(pos);
helix-core/src/syntax.rs+1−1
@@ -312,7 +312,7 @@ pub struct LanguageLayer {
312312 tree: Option<Tree>,
313313}
314314
315−use crate::state::{coords_at_pos, Coords};
315+use crate::state::coords_at_pos;
316316use crate::transaction::{ChangeSet, Operation};
317317use crate::Tendril;
318318