From 038201647c657b2b07fa7f87aae3c609c59c77ef Mon Sep 17 00:00:00 2001 From: Jan Hrastnik Date: Sun, 4 Oct 2020 23:47:37 +0200 Subject: started work on goto mode --- helix-core/src/state.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'helix-core') diff --git a/helix-core/src/state.rs b/helix-core/src/state.rs index 36ca221c..f74de9a9 100644 --- a/helix-core/src/state.rs +++ b/helix-core/src/state.rs @@ -9,6 +9,7 @@ use std::path::PathBuf; pub enum Mode { Normal, Insert, + Goto, } /// A state represents the current editor state of a single buffer. -- cgit v1.2.3-70-g09d2 From 5392b4826856e5e50653587ed5a13aef86805401 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Tue, 6 Oct 2020 17:30:41 +0900 Subject: Drop Coords. --- helix-core/src/state.rs | 3 --- helix-core/src/syntax.rs | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'helix-core') 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, } -use crate::state::{coords_at_pos, Coords}; +use crate::state::coords_at_pos; use crate::transaction::{ChangeSet, Operation}; use crate::Tendril; -- cgit v1.2.3-70-g09d2