aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/position.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-02 02:37:28 +0000
committerNathan Vegdahl2021-07-02 02:37:28 +0000
commit2224a1527ec9592f16131b0aa3923fc3d37592e7 (patch)
tree2a08b053cb32cef9dc1db5895778d419ebaebb5b /helix-core/src/position.rs
parente725957704274b1ec814a34ddf6f75faf35358e7 (diff)
parent9f62ad0715240156b512dfc7c584d2d0df05a664 (diff)
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
Diffstat (limited to 'helix-core/src/position.rs')
-rw-r--r--helix-core/src/position.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/helix-core/src/position.rs b/helix-core/src/position.rs
index 392eee9c..3d114b52 100644
--- a/helix-core/src/position.rs
+++ b/helix-core/src/position.rs
@@ -1,7 +1,7 @@
use crate::{
chars::char_is_line_ending,
graphemes::{nth_next_grapheme_boundary, RopeGraphemes},
- Rope, RopeSlice,
+ RopeSlice,
};
/// Represents a single point in a text buffer. Zero indexed.
@@ -70,6 +70,7 @@ pub fn pos_at_coords(text: RopeSlice, coords: Position) -> usize {
#[cfg(test)]
mod test {
use super::*;
+ use crate::Rope;
#[test]
fn test_ordering() {
@@ -79,8 +80,8 @@ mod test {
#[test]
fn test_coords_at_pos() {
- let text = Rope::from("ḧëḷḷö\nẅöṛḷḋ");
- let slice = text.slice(..);
+ // let text = Rope::from("ḧëḷḷö\nẅöṛḷḋ");
+ // let slice = text.slice(..);
// assert_eq!(coords_at_pos(slice, 0), (0, 0).into());
// assert_eq!(coords_at_pos(slice, 5), (0, 5).into()); // position on \n
// assert_eq!(coords_at_pos(slice, 6), (1, 0).into()); // position on w