aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-rw-r--r--helix-term/src/ui/editor.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 7f0d06e9..faede58c 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -9,7 +9,7 @@ use crate::{
use helix_core::{
coords_at_pos,
syntax::{self, HighlightEvent},
- Position, Range,
+ LineEnding, Position, Range,
};
use helix_view::{document::Mode, Document, Editor, Theme, View};
use std::borrow::Cow;
@@ -176,7 +176,7 @@ impl EditorView {
// iterate over range char by char
for grapheme in RopeGraphemes::new(text) {
- if grapheme == "\n" {
+ if LineEnding::from_rope_slice(&grapheme).is_some() {
visual_x = 0;
line += 1;