From 4b70ebe0130d746a471cd2772483979c68ee6744 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 23 May 2018 02:28:31 +0200 Subject: [PATCH] startup: stdin-text with -E, -Es (improved Ex-mode) Special-case for -E/-Es (as opposed to -e/-es). -es/-Es is the only mode that really allows N/Vim to work as a batch script engine. Adding a new flag (say `-x`) would involve a lot of churn: -es/-Es is implemented by checking `exmode_active` in numerous places. This commit does not change -es because some scripts use it. But scripts are unlikely to use -Es because it is not functionally different from -es. Also, both -es and -Es were broken in Nvim for years and no one mentioned it... --- src/nvim/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/main.c b/src/nvim/main.c index 268297aa7d..19e96c4b6a 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -729,7 +729,7 @@ static bool edit_stdin(mparm_T *parmp) { return !headless_mode && !embedded_mode - && !exmode_active // `-es` was not given. + && exmode_active != EXMODE_NORMAL // -E/-Es but not -e/-es. && !parmp->input_isatty && scriptin[0] == NULL; // `-s -` was not given. }