diff options
Diffstat (limited to 'src')
43 files changed, 149 insertions, 311 deletions
diff --git a/src/INSTALLvms.txt b/src/INSTALLvms.txt index e336da4cbe..de1446b2cb 100644 --- a/src/INSTALLvms.txt +++ b/src/INSTALLvms.txt @@ -77,9 +77,7 @@ from CVS mirror ftp://ftp.polarhome.com/pub/cvs/SOURCE/ Parameter name : MODEL Description : Build model selection - Options: : TINY - Almost no features enabled, not even - multiple windows - SMALL - Few features enabled, as basic as possible + Options: : TINY - No optional features enabled NORMAL - A default selection of features enabled BIG - Many features enabled, as rich as possible. (OpenVMS default) diff --git a/src/Make_ami.mak b/src/Make_ami.mak index 77ec32cfcb..a889ebd46f 100644 --- a/src/Make_ami.mak +++ b/src/Make_ami.mak @@ -45,9 +45,9 @@ CFLAGS +=\ -DFEAT_NORMAL else -# Vim 'small' build +# Vim 'small' build - now an alias for 'tiny' ifeq ($(BUILD),small) -CFLAGS += -DFEAT_SMALL +CFLAGS += -DFEAT_TINY else # Vim 'tiny' build diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index 55d13b105c..dfc540375b 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -28,8 +28,8 @@ # Updated 2014 Oct 13. #>>>>> choose options: -# FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE] -# Set to TINY to make minimal version (few features). +# FEATURES=[TINY | NORMAL | BIG | HUGE] +# Set to TINY to make a minimal version (no optional features). FEATURES=HUGE # Set to yes for a debug build. diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index 9529d0aac8..be08c6fd5e 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -16,7 +16,7 @@ # # !!!! After changing any features do "nmake clean" first !!!! # -# Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is HUGE) +# Feature Set: FEATURES=[TINY, NORMAL, BIG, HUGE] (default is HUGE) # # Name to add to the version: MODIFIED_BY=[name of modifier] # @@ -1124,7 +1124,7 @@ CFLAGS = $(CFLAGS) -DMSWINPS !endif # POSTSCRIPT # -# FEATURES: TINY, SMALL, NORMAL, BIG or HUGE +# FEATURES: TINY, NORMAL, BIG or HUGE # CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES) diff --git a/src/Make_vms.mms b/src/Make_vms.mms index f1689bef3c..4e945e534a 100644 --- a/src/Make_vms.mms +++ b/src/Make_vms.mms @@ -27,8 +27,7 @@ DECC = YES # Build model selection -# TINY - Almost no features enabled, not even multiple windows -# SMALL - Few features enabled, as basic as possible +# TINY - No optional features enabled # NORMAL - A default selection of features enabled # BIG - Many features enabled, as rich as possible. (default) # HUGE - All possible features enabled. diff --git a/src/Makefile b/src/Makefile index 14601a2473..8ac6e4f84d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -386,7 +386,7 @@ CClink = $(CC) # "liblua5.4-dev". # Use --with-luajit if you want to use LuaJIT instead of Lua. # Set PATH environment variable to find lua or luajit executable. -# This requires at least "normal" features, "tiny" and "small" don't work. +# This requires at least "normal" features, "tiny" doesn't work. #CONF_OPT_LUA = --enable-luainterp #CONF_OPT_LUA = --enable-luainterp=dynamic #CONF_OPT_LUA = --enable-luainterp --with-luajit @@ -415,14 +415,14 @@ CClink = $(CC) # the next line. # When you get an error for a missing "perl.exp" file, try creating an empty # one: "touch perl.exp". -# This requires at least "normal" features, "tiny" and "small" don't work. +# This requires at least "normal" features, "tiny" doesn't work. #CONF_OPT_PERL = --enable-perlinterp #CONF_OPT_PERL = --enable-perlinterp=dynamic # PYTHON # Uncomment lines here when you want to include the Python interface. # Debian package is "libpython3-dev". -# This requires at least "normal" features, "tiny" and "small" don't work. +# This requires at least "normal" features, "tiny" doesn't work. # Python 3 is preferred, Python 2 (often referred to as "Python") has been # deprecated for a long time. # NOTE: This may cause threading to be enabled, which has side effects (such @@ -444,7 +444,7 @@ CClink = $(CC) # Uncomment this when you want to include the Ruby interface. # First one for static linking, second one for loading when used. # Debian package is "ruby-dev". -# This requires at least "normal" features, "tiny" and "small" don't work. +# This requires at least "normal" features, "tiny" doesn't work. #CONF_OPT_RUBY = --enable-rubyinterp #CONF_OPT_RUBY = --enable-rubyinterp=dynamic #CONF_OPT_RUBY = --enable-rubyinterp --with-ruby-command=ruby1.9.1 @@ -453,6 +453,7 @@ CClink = $(CC) # Uncomment this when you want to include the Tcl interface. # First one is for static linking, second one for dynamic loading. # Debian package is "tcl-dev". +# This requires at least "normal" features, "tiny" doesn't work. #CONF_OPT_TCL = --enable-tclinterp #CONF_OPT_TCL = --enable-tclinterp=dynamic #CONF_OPT_TCL = --enable-tclinterp --with-tclsh=tclsh8.4 @@ -530,7 +531,6 @@ CClink = $(CC) # Uncomment one of these lines when you want to include few to many features. # The default is "huge" for most systems. #CONF_OPT_FEAT = --with-features=tiny -#CONF_OPT_FEAT = --with-features=small #CONF_OPT_FEAT = --with-features=normal #CONF_OPT_FEAT = --with-features=big #CONF_OPT_FEAT = --with-features=huge diff --git a/src/arglist.c b/src/arglist.c index 06398e2070..4c64d2ab54 100644 --- a/src/arglist.c +++ b/src/arglist.c @@ -1186,13 +1186,11 @@ do_arg_all( tabpage_T *last_curtab; int prev_arglist_locked = arglist_locked; -#ifdef FEAT_CMDWIN if (cmdwin_type != 0) { emsg(_(e_invalid_in_cmdline_window)); return; } -#endif if (ARGCOUNT <= 0) { // Don't give an error message. We don't want it when the ":all" diff --git a/src/auto/configure b/src/auto/configure index 4bec8a7201..9e2512dad2 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -1523,7 +1523,7 @@ Optional Packages: --with-view-name=NAME what to call the View executable --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories --with-modified-by=NAME name of who modified a release version - --with-features=TYPE tiny, small, normal, big or huge (default: huge) + --with-features=TYPE tiny, normal, big or huge (default: huge) --with-compiledby=NAME name to show in :version message --with-lua-prefix=PFX Prefix where Lua is installed. --with-luajit Link with LuaJIT instead of Lua. @@ -5219,13 +5219,15 @@ $as_echo "Defaulting to huge" >&6; } fi +case "$features" in + small) features="tiny" ;; +esac + dovimdiff="" dogvimdiff="" case "$features" in tiny) $as_echo "#define FEAT_TINY 1" >>confdefs.h ;; - small) $as_echo "#define FEAT_SMALL 1" >>confdefs.h - ;; normal) $as_echo "#define FEAT_NORMAL 1" >>confdefs.h dovimdiff="installvimdiff"; dogvimdiff="installgvimdiff" ;; @@ -5242,7 +5244,7 @@ esac -if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then +if test "x$features" = "xtiny"; then has_eval=no else has_eval=yes @@ -5300,7 +5302,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking diff feature" >&5 $as_echo_n "checking diff feature... " >&6; } -if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then +if test "x$features" = "xtiny"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled in $features version" >&5 $as_echo "disabled in $features version" >&6; } else @@ -5326,7 +5328,7 @@ $as_echo "$enable_luainterp" >&6; } if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then if test "$has_eval" = "no"; then - as_fn_error $? "cannot use Lua with tiny or small features" "$LINENO" 5 + as_fn_error $? "cannot use Lua with tiny features" "$LINENO" 5 fi @@ -6096,7 +6098,7 @@ fi $as_echo "$enable_perlinterp" >&6; } if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then if test "$has_eval" = "no"; then - as_fn_error $? "cannot use Perl with tiny or small features" "$LINENO" 5 + as_fn_error $? "cannot use Perl with tiny features" "$LINENO" 5 fi # Extract the first word of "perl", so it can be a program name with args. @@ -6301,7 +6303,7 @@ fi $as_echo "$enable_pythoninterp" >&6; } if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then if test "$has_eval" = "no"; then - as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5 + as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5 @@ -6652,7 +6654,7 @@ fi $as_echo "$enable_python3interp" >&6; } if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then if test "$has_eval" = "no"; then - as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5 + as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5 @@ -7580,7 +7582,7 @@ fi $as_echo "$enable_rubyinterp" >&6; } if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then if test "$has_eval" = "no"; then - as_fn_error $? "cannot use Ruby with tiny or small features" "$LINENO" 5 + as_fn_error $? "cannot use Ruby with tiny features" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5 @@ -7758,8 +7760,8 @@ fi if test "$enable_netbeans" = "yes"; then if test "$has_eval" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny or small features" >&5 -$as_echo "cannot use NetBeans with tiny or small features" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny features" >&5 +$as_echo "cannot use NetBeans with tiny features" >&6; } enable_netbeans="no" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -7781,8 +7783,8 @@ fi if test "$enable_channel" = "yes"; then if test "$has_eval" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny or small features" >&5 -$as_echo "cannot use channels with tiny or small features" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny features" >&5 +$as_echo "cannot use channels with tiny features" >&6; } enable_channel="no" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -8085,8 +8087,8 @@ fi if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then if test "$has_eval" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny or small features" >&5 -$as_echo "cannot use terminal emulator with tiny or small features" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny features" >&5 +$as_echo "cannot use terminal emulator with tiny features" >&6; } enable_terminal="no" else if test "$enable_terminal" = "auto"; then @@ -12892,8 +12894,8 @@ $as_echo "Defaulting to no" >&6; } fi else if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny or small features" >&5 -$as_echo "cannot use sound with tiny or small features" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5 +$as_echo "cannot use sound with tiny features" >&6; } enable_canberra="no" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5 @@ -14721,7 +14723,7 @@ rm -f core conftest.err conftest.$ac_objext \ { $as_echo "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5 $as_echo "msgfmt not found - disabled" >&6; }; fi - if test $have_gettext = "yes" -a "x$features" != "xtiny" -a "x$features" != "xsmall"; then + if test $have_gettext = "yes" -a "x$features" != "xtiny"; then $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h MAKEMO=yes diff --git a/src/config.h.in b/src/config.h.in index 875d9afd54..89e6f2380c 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -319,9 +319,6 @@ /* Define if you want tiny features. */ #undef FEAT_TINY -/* Define if you want small features. */ -#undef FEAT_SMALL - /* Define if you want normal features. */ #undef FEAT_NORMAL diff --git a/src/configure.ac b/src/configure.ac index f9d6e42c19..a588ad6e5f 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -522,15 +522,19 @@ fi dnl Check user requested features. AC_MSG_CHECKING(--with-features argument) -AC_ARG_WITH(features, [ --with-features=TYPE tiny, small, normal, big or huge (default: huge)], +AC_ARG_WITH(features, [ --with-features=TYPE tiny, normal, big or huge (default: huge)], features="$withval"; AC_MSG_RESULT($features), features="huge"; AC_MSG_RESULT(Defaulting to huge)) +dnl "small" is supported for backwards compatibility, now an alias for "tiny" +case "$features" in + small) features="tiny" ;; +esac + dovimdiff="" dogvimdiff="" case "$features" in tiny) AC_DEFINE(FEAT_TINY) ;; - small) AC_DEFINE(FEAT_SMALL) ;; normal) AC_DEFINE(FEAT_NORMAL) dovimdiff="installvimdiff"; dogvimdiff="installgvimdiff" ;; big) AC_DEFINE(FEAT_BIG) dovimdiff="installvimdiff"; @@ -543,7 +547,7 @@ esac AC_SUBST(dovimdiff) AC_SUBST(dogvimdiff) -if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then +if test "x$features" = "xtiny"; then has_eval=no else has_eval=yes @@ -577,7 +581,7 @@ else fi AC_MSG_CHECKING([diff feature]) -if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then +if test "x$features" = "xtiny"; then AC_MSG_RESULT([disabled in $features version]) else AC_MSG_RESULT(enabled) @@ -595,7 +599,7 @@ AC_MSG_RESULT($enable_luainterp) if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then if test "$has_eval" = "no"; then - AC_MSG_ERROR([cannot use Lua with tiny or small features]) + AC_MSG_ERROR([cannot use Lua with tiny features]) fi dnl -- find the lua executable @@ -1082,7 +1086,7 @@ AC_ARG_ENABLE(perlinterp, AC_MSG_RESULT($enable_perlinterp) if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then if test "$has_eval" = "no"; then - AC_MSG_ERROR([cannot use Perl with tiny or small features]) + AC_MSG_ERROR([cannot use Perl with tiny features]) fi AC_SUBST(vi_cv_path_perl) AC_PATH_PROG(vi_cv_path_perl, perl) @@ -1231,7 +1235,7 @@ AC_ARG_ENABLE(pythoninterp, AC_MSG_RESULT($enable_pythoninterp) if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then if test "$has_eval" = "no"; then - AC_MSG_ERROR([cannot use Python with tiny or small features]) + AC_MSG_ERROR([cannot use Python with tiny features]) fi dnl -- find the python executable @@ -1466,7 +1470,7 @@ AC_ARG_ENABLE(python3interp, AC_MSG_RESULT($enable_python3interp) if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then if test "$has_eval" = "no"; then - AC_MSG_ERROR([cannot use Python with tiny or small features]) + AC_MSG_ERROR([cannot use Python with tiny features]) fi dnl -- find the python3 executable @@ -1979,7 +1983,7 @@ AC_ARG_ENABLE(rubyinterp, AC_MSG_RESULT($enable_rubyinterp) if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then if test "$has_eval" = "no"; then - AC_MSG_ERROR([cannot use Ruby with tiny or small features]) + AC_MSG_ERROR([cannot use Ruby with tiny features]) fi AC_MSG_CHECKING(--with-ruby-command argument) @@ -2092,7 +2096,7 @@ AC_ARG_ENABLE(netbeans, , [enable_netbeans="yes"]) if test "$enable_netbeans" = "yes"; then if test "$has_eval" = "no"; then - AC_MSG_RESULT([cannot use NetBeans with tiny or small features]) + AC_MSG_RESULT([cannot use NetBeans with tiny features]) enable_netbeans="no" else AC_MSG_RESULT(no) @@ -2107,7 +2111,7 @@ AC_ARG_ENABLE(channel, , [enable_channel="yes"]) if test "$enable_channel" = "yes"; then if test "$has_eval" = "no"; then - AC_MSG_RESULT([cannot use channels with tiny or small features]) + AC_MSG_RESULT([cannot use channels with tiny features]) enable_channel="no" else AC_MSG_RESULT(no) @@ -2215,7 +2219,7 @@ AC_ARG_ENABLE(terminal, , [enable_terminal="auto"]) if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then if test "$has_eval" = "no"; then - AC_MSG_RESULT([cannot use terminal emulator with tiny or small features]) + AC_MSG_RESULT([cannot use terminal emulator with tiny features]) enable_terminal="no" else if test "$enable_terminal" = "auto"; then @@ -3722,7 +3726,7 @@ if test "$enable_canberra" = "maybe"; then fi else if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then - AC_MSG_RESULT([cannot use sound with tiny or small features]) + AC_MSG_RESULT([cannot use sound with tiny features]) enable_canberra="no" else AC_MSG_RESULT($enable_canberra) @@ -4432,7 +4436,7 @@ if test "$enable_nls" = "yes"; then else AC_MSG_RESULT([msgfmt not found - disabled]); fi - if test $have_gettext = "yes" -a "x$features" != "xtiny" -a "x$features" != "xsmall"; then + if test $have_gettext = "yes" -a "x$features" != "xtiny"; then AC_DEFINE(HAVE_GETTEXT) MAKEMO=yes AC_SUBST(MAKEMO) diff --git a/src/drawline.c b/src/drawline.c index d36eee7f59..3e796d23e2 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -156,11 +156,7 @@ typedef struct { // draw_state values for items that are drawn in sequence: #define WL_START 0 // nothing done yet, must be zero -#ifdef FEAT_CMDWIN -# define WL_CMDLINE (WL_START + 1) // cmdline window column -#else -# define WL_CMDLINE WL_START -#endif +#define WL_CMDLINE (WL_START + 1) // cmdline window column #ifdef FEAT_FOLDING # define WL_FOLD (WL_CMDLINE + 1) // 'foldcolumn' #else @@ -1678,7 +1674,6 @@ win_line( line_attr = line_attr_save; } #endif -#ifdef FEAT_CMDWIN if (wlv.draw_state == WL_CMDLINE - 1 && wlv.n_extra == 0) { wlv.draw_state = WL_CMDLINE; @@ -1692,7 +1687,6 @@ win_line( hl_combine_attr(wlv.wcr_attr, HL_ATTR(HLF_AT)); } } -#endif #ifdef FEAT_FOLDING if (wlv.draw_state == WL_FOLD - 1 && wlv.n_extra == 0) { diff --git a/src/drawscreen.c b/src/drawscreen.c index 4735492423..3ad7e00cc7 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -1102,7 +1102,6 @@ fold_line( // 1. Add the cmdwin_type for the command-line window // Ignores 'rightleft', this window is never right-left. -#ifdef FEAT_CMDWIN if (cmdwin_type != 0 && wp == curwin) { ScreenLines[off] = cmdwin_type; @@ -1111,7 +1110,6 @@ fold_line( ScreenLinesUC[off] = 0; ++col; } -#endif #ifdef FEAT_RIGHTLEFT # define RL_MEMSET(p, v, l) \ diff --git a/src/edit.c b/src/edit.c index 4479964591..2484fe555d 100644 --- a/src/edit.c +++ b/src/edit.c @@ -785,7 +785,6 @@ edit( // FALLTHROUGH case Ctrl_C: // End input mode -#ifdef FEAT_CMDWIN if (c == Ctrl_C && cmdwin_type != 0) { // Close the cmdline window. @@ -794,7 +793,6 @@ edit( nomove = TRUE; goto doESCkey; } -#endif #ifdef FEAT_JOB_CHANNEL if (c == Ctrl_C && bt_prompt(curbuf)) { @@ -1196,14 +1194,12 @@ doESCkey: break; } #endif -#ifdef FEAT_CMDWIN if (cmdwin_type != 0) { // Execute the command in the cmdline window. cmdwin_result = CAR; goto doESCkey; } -#endif #ifdef FEAT_JOB_CHANNEL if (bt_prompt(curbuf)) { diff --git a/src/errors.h b/src/errors.h index 3fa2db1e60..5a976deac2 100644 --- a/src/errors.h +++ b/src/errors.h @@ -15,10 +15,8 @@ EXTERN char e_interrupted[] EXTERN char e_backslash_should_be_followed_by[] INIT(= N_("E10: \\ should be followed by /, ? or &")); -#ifdef FEAT_CMDWIN EXTERN char e_invalid_in_cmdline_window[] INIT(= N_("E11: Invalid in command-line window; :q<CR> closes the window")); -#endif EXTERN char e_command_not_allowed_from_vimrc_in_current_dir_or_tag_search[] INIT(= N_("E12: Command not allowed from exrc/vimrc in current dir or tag search")); EXTERN char e_file_exists[] @@ -461,10 +459,8 @@ EXTERN char e_no_digraphs_version[] EXTERN char e_cannot_set_language_to_str[] INIT(= N_("E197: Cannot set language to \"%s\"")); // E198 unused -#ifdef FEAT_CMDWIN EXTERN char e_active_window_or_buffer_deleted[] INIT(= N_("E199: Active window or buffer deleted")); -#endif EXTERN char e_readpre_autocommands_made_file_unreadable[] INIT(= N_("E200: *ReadPre autocommands made the file unreadable")); EXTERN char e_readpre_autocommands_must_not_change_current_buffer[] @@ -3012,7 +3008,7 @@ EXTERN char e_expression_does_not_result_in_value_str[] #endif EXTERN char e_failed_to_source_defaults[] INIT(= N_("E1187: Failed to source defaults.vim")); -#if defined(FEAT_TERMINAL) && defined(FEAT_CMDWIN) +#if defined(FEAT_TERMINAL) EXTERN char e_cannot_open_terminal_from_command_line_window[] INIT(= N_("E1188: Cannot open a terminal from the command line window")); #endif @@ -3291,10 +3287,8 @@ EXTERN char e_substitute_nesting_too_deep[] EXTERN char e_invalid_argument_nr[] INIT(= N_("E1291: Invalid argument: %ld")); #endif -#ifdef FEAT_CMDWIN EXTERN char e_cmdline_window_already_open[] INIT(= N_("E1292: Command-line window is already open")); -#endif #ifdef FEAT_PROP_POPUP EXTERN char e_cannot_use_negative_id_after_adding_textprop_with_text[] INIT(= N_("E1293: Cannot use a negative id after adding a textprop with text")); diff --git a/src/evalfunc.c b/src/evalfunc.c index 5c6591c42b..22aa03b47d 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -5582,13 +5582,7 @@ f_has(typval_T *argvars, typval_T *rettv) }, {"cmdline_compl", 1}, {"cmdline_hist", 1}, - {"cmdwin", -#ifdef FEAT_CMDWIN - 1 -#else - 0 -#endif - }, + {"cmdwin", 1}, {"comments", 1}, {"conceal", #ifdef FEAT_CONCEAL diff --git a/src/evalwindow.c b/src/evalwindow.c index 7a019627fb..3d3301f65c 100644 --- a/src/evalwindow.c +++ b/src/evalwindow.c @@ -821,13 +821,11 @@ f_win_gotoid(typval_T *argvars, typval_T *rettv) return; id = tv_get_number(&argvars[0]); -#ifdef FEAT_CMDWIN if (cmdwin_type != 0) { emsg(_(e_invalid_in_cmdline_window)); return; } -#endif #if defined(FEAT_PROP_POPUP) && defined(FEAT_TERMINAL) if (popup_is_popup(curwin) && curbuf->b_term != NULL) { @@ -1065,10 +1063,8 @@ f_win_gettype(typval_T *argvars, typval_T *rettv) else if (WIN_IS_POPUP(wp)) rettv->vval.v_string = vim_strsave((char_u *)"popup"); #endif -#ifdef FEAT_CMDWIN else if (wp == curwin && cmdwin_type != 0) rettv->vval.v_string = vim_strsave((char_u *)"command"); -#endif #ifdef FEAT_QUICKFIX else if (bt_quickfix(wp->w_buffer)) rettv->vval.v_string = vim_strsave((char_u *) @@ -1085,14 +1081,12 @@ f_getcmdwintype(typval_T *argvars UNUSED, typval_T *rettv) { rettv->v_type = VAR_STRING; rettv->vval.v_string = NULL; -#ifdef FEAT_CMDWIN rettv->vval.v_string = alloc(2); if (rettv->vval.v_string != NULL) { rettv->vval.v_string[0] = cmdwin_type; rettv->vval.v_string[1] = NUL; } -#endif } /* diff --git a/src/ex_cmds.c b/src/ex_cmds.c index a5eae8d166..3c13b8de29 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -2739,12 +2739,11 @@ do_ecmd( if (buf != curbuf) { bufref_T save_au_new_curbuf; -#ifdef FEAT_CMDWIN int save_cmdwin_type = cmdwin_type; // BufLeave applies to the old buffer. cmdwin_type = 0; -#endif + /* * Be careful: The autocommands may delete any buffer and change * the current buffer. @@ -2760,9 +2759,7 @@ do_ecmd( save_au_new_curbuf = au_new_curbuf; set_bufref(&au_new_curbuf, buf); apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf); -#ifdef FEAT_CMDWIN cmdwin_type = save_cmdwin_type; -#endif if (!bufref_valid(&au_new_curbuf)) { // new buffer has been deleted diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 4531794ffd..a7047d49ca 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2083,14 +2083,12 @@ do_one_cmd( if (!IS_USER_CMDIDX(ea.cmdidx)) { -#ifdef FEAT_CMDWIN if (cmdwin_type != 0 && !(ea.argt & EX_CMDWIN)) { // Command not allowed in the command line window errormsg = _(e_invalid_in_cmdline_window); goto doend; } -#endif if (text_locked() && !(ea.argt & EX_LOCK_OK)) { // Command not allowed when text is locked @@ -5849,13 +5847,11 @@ ex_quit(exarg_T *eap) { win_T *wp; -#ifdef FEAT_CMDWIN if (cmdwin_type != 0) { cmdwin_result = Ctrl_C; return; } -#endif // Don't quit while editing the command line. if (text_locked()) { @@ -5934,7 +5930,6 @@ ex_cquit(exarg_T *eap |