From 5d22e3c4e574eb24260966de7f20f582e6184e24 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Sun, 20 Jun 2021 00:40:41 -0700 Subject: Misc fixes and clean up of line ending detect code. --- helix-term/src/ui/editor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'helix-term') diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 42bb3ba8..da8f0f53 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -7,9 +7,9 @@ use crate::{ }; use helix_core::{ - coords_at_pos, rope_slice_to_line_ending, + coords_at_pos, syntax::{self, HighlightEvent}, - Position, Range, + LineEnding, Position, Range, }; use helix_view::input::{KeyCode, KeyEvent, KeyModifiers}; use helix_view::{document::Mode, Document, Editor, Theme, View}; @@ -177,7 +177,7 @@ impl EditorView { // iterate over range char by char for grapheme in RopeGraphemes::new(text) { - if rope_slice_to_line_ending(&grapheme).is_some() { + if LineEnding::from_rope_slice(&grapheme).is_some() { visual_x = 0; line += 1; -- cgit v1.2.3-70-g09d2