aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui')
-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 d0eedad6..42bb3ba8 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -7,7 +7,7 @@ use crate::{
};
use helix_core::{
- coords_at_pos,
+ coords_at_pos, rope_slice_to_line_ending,
syntax::{self, HighlightEvent},
Position, Range,
};
@@ -177,7 +177,7 @@ impl EditorView {
// iterate over range char by char
for grapheme in RopeGraphemes::new(text) {
- if grapheme == "\n" {
+ if rope_slice_to_line_ending(&grapheme).is_some() {
visual_x = 0;
line += 1;