From 953ab2d00724c6d6c7be9caa71b92e4d2424d907 Mon Sep 17 00:00:00 2001 From: Shafkath Shuhan Date: Tue, 5 Apr 2022 21:34:40 -0400 Subject: [PATCH] account for unicode-lines feaure in line-ending doc --- book/src/generated/typable-cmd.md | 2 +- helix-term/src/commands/typed.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/book/src/generated/typable-cmd.md b/book/src/generated/typable-cmd.md index 1ee2fac4b09ec..88188008776e3 100644 --- a/book/src/generated/typable-cmd.md +++ b/book/src/generated/typable-cmd.md @@ -13,7 +13,7 @@ | `:new`, `:n` | Create a new scratch buffer. | | `:format`, `:fmt` | Format the file using the LSP formatter. | | `:indent-style` | Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.) | -| `:line-ending` | Set the document's default line ending. Options: crlf, lf, cr, ff, nel. | +| `:line-ending` | Set the document's default line ending. Options: crlf, lf. | | `:earlier`, `:ear` | Jump back to an earlier point in edit history. Accepts a number of steps or a time span. | | `:later`, `:lat` | Jump to a later point in edit history. Accepts a number of steps or a time span. | | `:write-quit`, `:wq`, `:x` | Write changes to disk and close the current view. Accepts an optional path (:wq some/path.txt) | diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 4ccfe664defbd..e2cb0a4e9b599 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -1132,6 +1132,9 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[ TypableCommand { name: "line-ending", aliases: &[], + #[cfg(not(feature = "unicode-lines"))] + doc: "Set the document's default line ending. Options: crlf, lf.", + #[cfg(feature = "unicode-lines")] doc: "Set the document's default line ending. Options: crlf, lf, cr, ff, nel.", fun: set_line_ending, completer: None,