From 3f7a4655351dc6facb709ab4d3c6e3bd8164da77 Mon Sep 17 00:00:00 2001 From: Michael Reed Date: Sun, 15 Nov 2015 17:43:41 -0500 Subject: ex_cmds.lua: Use ex_ni directly As can be seen in [1], the ifdefs are leftovers from Vim, where tons of features are optional. This is not the case in Nvim, so the macros are of little use. Besides, ex_ni is already used in a bunch of places, just not consistently. The ex_language macro was left untouched as the inclusion of ``:language'' actually is determined at compile time, unlike the other commands which _always_ print "this command is not available in this version". [1]: https://github.com/vim/vim/blob/master/src/ex_docmd.c#L18-L497 Reviewed-by: Justin M. Keyes --- src/nvim/ex_cmds.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/nvim/ex_cmds.lua') diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 79b53b9fb5..b7a3505c99 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -989,13 +989,13 @@ return { command='gui', flags=bit.bor(BANG, FILES, EDITCMD, ARGOPT, TRLBAR, CMDWIN), addr_type=ADDR_LINES, - func='ex_gui', + func='ex_nogui', }, { command='gvim', flags=bit.bor(BANG, FILES, EDITCMD, ARGOPT, TRLBAR, CMDWIN), addr_type=ADDR_LINES, - func='ex_gui', + func='ex_nogui', }, { command='help', @@ -1013,7 +1013,7 @@ return { command='helpfind', flags=bit.bor(EXTRA, NOTRLCOM), addr_type=ADDR_LINES, - func='ex_helpfind', + func='ex_ni', }, { command='helpgrep', @@ -1643,19 +1643,19 @@ return { command='nbkey', flags=bit.bor(EXTRA, NOTADR, NEEDARG), addr_type=ADDR_LINES, - func='ex_nbkey', + func='ex_ni', }, { command='nbclose', flags=bit.bor(TRLBAR, CMDWIN), addr_type=ADDR_LINES, - func='ex_nbclose', + func='ex_ni', }, { command='nbstart', flags=bit.bor(WORD1, TRLBAR, CMDWIN), addr_type=ADDR_LINES, - func='ex_nbstart', + func='ex_ni', }, { command='new', @@ -1859,7 +1859,7 @@ return { command='popup', flags=bit.bor(NEEDARG, EXTRA, BANG, TRLBAR, NOTRLCOM, CMDWIN), addr_type=ADDR_LINES, - func='ex_popup', + func='ex_ni', }, { command='ppop', @@ -1883,13 +1883,13 @@ return { command='promptfind', flags=bit.bor(EXTRA, NOTRLCOM, CMDWIN), addr_type=ADDR_LINES, - func='gui_mch_find_dialog', + func='ex_ni', }, { command='promptrepl', flags=bit.bor(EXTRA, NOTRLCOM, CMDWIN), addr_type=ADDR_LINES, - func='gui_mch_replace_dialog', + func='ex_ni', }, { command='profile', @@ -2303,7 +2303,7 @@ return { command='simalt', flags=bit.bor(NEEDARG, WORD1, TRLBAR, CMDWIN), addr_type=ADDR_LINES, - func='ex_simalt', + func='ex_ni', }, { command='sign', @@ -3029,7 +3029,7 @@ return { command='wsverb', flags=bit.bor(EXTRA, NOTADR, NEEDARG), addr_type=ADDR_LINES, - func='ex_wsverb', + func='ex_ni', }, { command='wshada', -- cgit