aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/main.c4
-rw-r--r--src/nvim/po/fr.po3
-rw-r--r--test/functional/core/startup_spec.lua7
3 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index e7835ccbf1..be1f08bb46 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -1223,6 +1223,10 @@ scripterror:
}
}
+ if (embedded_mode && silent_mode) {
+ mainerr(_("--embed conflicts with -es/-Es"), NULL);
+ }
+
// If there is a "+123" or "-c" command, set v:swapcommand to the first one.
if (parmp->n_commands > 0) {
const size_t swcmd_len = STRLEN(parmp->commands[0]) + 3;
diff --git a/src/nvim/po/fr.po b/src/nvim/po/fr.po
index 5c4c154654..ea6fe302fe 100644
--- a/src/nvim/po/fr.po
+++ b/src/nvim/po/fr.po
@@ -7403,3 +7403,6 @@ msgstr ""
"Source C (*.c, *.h)\t*.c;*.h\n"
"Source C++ (*.cpp, *.hpp)\t*.cpp;*.hpp\n"
"Fichiers Vim (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n"
+
+msgid "--embed conflicts with -es/-Es"
+msgstr "les paramètres -es/-ES sont incompatibles avec --embed"
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua
index 2d6eb4dd45..5098d764ff 100644
--- a/test/functional/core/startup_spec.lua
+++ b/test/functional/core/startup_spec.lua
@@ -217,6 +217,13 @@ describe('startup', function()
end
end)
+ it('fails on --embed with -es/-Es', function()
+ eq('nvim: --embed conflicts with -es/-Es\nMore info with "nvim -h"\n',
+ funcs.system({nvim_prog, '--embed', '-es' }))
+ eq('nvim: --embed conflicts with -es/-Es\nMore info with "nvim -h"\n',
+ funcs.system({nvim_prog, '--embed', '-Es' }))
+ end)
+
it('does not crash if --embed is given twice', function()
clear{args={'--embed'}}
eq(2, eval('1+1'))