From 8b2a14153b0d21391e06636d0df7e8cc1b8143c4 Mon Sep 17 00:00:00 2001 From: Alexis Kalabura Date: Thu, 21 Jul 2022 00:03:12 -0400 Subject: add statusline element to display file line endings (#3113) * add statusline element to display file line endings * run cargo fmt --all * change the word *ending* from plural to singular * support for the unicode-lines feature flag--- helix-term/src/commands/typed.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'helix-term/src/commands/typed.rs') diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index fb03af44..d6db117e 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -413,12 +413,11 @@ fn set_line_ending( // Attempt to parse argument as a line ending. let line_ending = match arg { - // We check for CR first because it shares a common prefix with CRLF. - #[cfg(feature = "unicode-lines")] - arg if arg.starts_with("cr") => CR, arg if arg.starts_with("crlf") => Crlf, arg if arg.starts_with("lf") => LF, #[cfg(feature = "unicode-lines")] + arg if arg.starts_with("cr") => CR, + #[cfg(feature = "unicode-lines")] arg if arg.starts_with("ff") => FF, #[cfg(feature = "unicode-lines")] arg if arg.starts_with("nel") => Nel, -- cgit v1.2.3-70-g09d2