diff options
author | Jan Hrastnik | 2021-06-14 13:09:54 +0000 |
---|---|---|
committer | Jan Hrastnik | 2021-06-16 15:13:41 +0000 |
commit | a4f5a0134e308ffad318ab6920fe1ed0264a93cb (patch) | |
tree | ae7ffa85fd3413e0fafc53443c98d6ddae34149c /helix-term/src/ui | |
parent | a9a718c3cad3af7b9fa38cd1aaa6ceb6c7126130 (diff) |
trying out line ending helper functions in commands.rs
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/editor.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 0a646e93..d6010e6c 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, }; @@ -179,7 +179,7 @@ impl EditorView { // iterate over range char by char for grapheme in RopeGraphemes::new(text) { - if grapheme == "\n" || grapheme == "\r\n" { + if rope_slice_to_line_ending(&grapheme).is_some() { visual_x = 0; line += 1; |