diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 55d289e91..41506cc82 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -85,6 +85,10 @@ impl EditorView { Center, } + /// Declare the welcome screen declaratively using this macro + /// It avoids the performance overhead of calling `Vec>::flatten` and + /// makes it easy to get the longest line in the center and the left, without + /// having to iterate over the `Vec<_>` again. macro_rules! welcome { ( $([$align:ident] $line:expr, $(if $cond:expr;)?)* $(,)?