aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-10-06 08:30:41 +0000
committerBlaž Hrastnik2020-10-07 04:59:19 +0000
commit5392b4826856e5e50653587ed5a13aef86805401 (patch)
tree937df39c3a1a879cde0db3c42801ab1cfd368ef5
parent61ef0a4e87cf6b3a9c64c7d003f373d53fe61818 (diff)
Drop Coords.
-rw-r--r--helix-core/src/state.rs3
-rw-r--r--helix-core/src/syntax.rs2
2 files changed, 1 insertions, 4 deletions
diff --git a/helix-core/src/state.rs b/helix-core/src/state.rs
index f74de9a9..047ff83d 100644
--- a/helix-core/src/state.rs
+++ b/helix-core/src/state.rs
@@ -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.
pub fn coords_at_pos(text: &RopeSlice, pos: usize) -> Position {
let line = text.char_to_line(pos);
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index 638ec8ee..3e5927e5 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -312,7 +312,7 @@ pub struct LanguageLayer {
tree: Option<Tree>,
}
-use crate::state::{coords_at_pos, Coords};
+use crate::state::coords_at_pos;
use crate::transaction::{ChangeSet, Operation};
use crate::Tendril;