diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-05-23 02:28:31 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-06-04 02:07:40 +0200 |
commit | 4b70ebe0130d746a471cd2772483979c68ee6744 (patch) | |
tree | 71eded9b7d1c8ee95144837cceb289c040bc243a | |
parent | 905d4d78fc4a702613b694d4ece984b69f5f2481 (diff) | |
download | rneovim-4b70ebe0130d746a471cd2772483979c68ee6744.tar.gz rneovim-4b70ebe0130d746a471cd2772483979c68ee6744.tar.bz2 rneovim-4b70ebe0130d746a471cd2772483979c68ee6744.zip |
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...
-rw-r--r-- | src/nvim/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
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. } |