From 6a3f7f2c399f0b92cef97b0c85ebe976fd7cfcac Mon Sep 17 00:00:00 2001 From: Matthew Toohey Date: Tue, 21 Jun 2022 12:36:36 -0400 Subject: feat: make `move_vertically` aware of tabs and wide characters (#2620) * feat: make `move_vertically` aware of tabs and wide characters * refactor: replace unnecessary checked_sub with comparison * refactor: leave pos_at_coords unchanged and introduce separate pos_at_visual_coords * style: include comment to explain `pos_at_visual_coords` breaking condition * refactor: use `pos_at_visual_coords` in `text_pos_at_screen_coords` * feat: make `copy_selection_on_line` aware of wide characters--- helix-core/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'helix-core/src/lib.rs') diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs index 627b73bb..735a62c1 100644 --- a/helix-core/src/lib.rs +++ b/helix-core/src/lib.rs @@ -63,7 +63,9 @@ pub type Tendril = SmartString; pub use {regex, tree_sitter}; pub use graphemes::RopeGraphemes; -pub use position::{coords_at_pos, pos_at_coords, visual_coords_at_pos, Position}; +pub use position::{ + coords_at_pos, pos_at_coords, pos_at_visual_coords, visual_coords_at_pos, Position, +}; pub use selection::{Range, Selection}; pub use smallvec::{smallvec, SmallVec}; pub use syntax::Syntax; -- cgit v1.2.3-70-g09d2