Patch 9.0.0657
Problem:    Too many #ifdefs.
Solution:   Graduate the +cmdwin feature.  Now the tiny and small builds are
            equal, drop the small build.  (Martin Tournoij, closes #11268)
Files:      .appveyor.yml, runtime/doc/various.txt, runtime/doc/cmdline.txt,
            src/feature.h, src/INSTALLvms.txt, src/Make_ami.mak,
            src/Make_cyg_ming.mak, src/Make_mvc.mak, src/Make_vms.mms,
            src/Makefile, src/configure.ac, src/auto/configure,
            src/config.h.in, src/if_mzsch.c, src/testdir/Make_all.mak,
            src/version.c, src/vim.h, src/arglist.c, src/drawline.c,
            src/drawscreen.c, src/edit.c, src/errors.h, src/evalfunc.c,
            src/evalwindow.c, src/ex_cmds.c, src/ex_docmd.c, src/ex_getln.c,
            src/getchar.c, src/globals.h, src/gui.c, src/gui_gtk_x11.c,
            src/gui_motif.c, src/gui_w32.c, src/insexpand.c, src/main.c,
            src/map.c, src/mouse.c, src/move.c, src/normal.c, src/option.c,
            src/option.h, src/optiondefs.h, src/optionstr.c, src/terminal.c,
            src/textformat.c, src/window.c


*** ../vim-9.0.0656/.appveyor.yml       2022-09-21 12:19:41.612159067 +0100
--- .appveyor.yml       2022-10-04 14:57:31.517342197 +0100
***************
*** 7,13 ****
      - FEATURE: HUGE
  # disabled
  #    - FEATURE: TINY
- #    - FEATURE: SMALL
  #    - FEATURE: NORMAL
  #    - FEATURE: BIG
  
--- 7,12 ----
*** ../vim-9.0.0656/runtime/doc/various.txt     2022-09-17 21:07:52.087993184 
+0100
--- runtime/doc/various.txt     2022-10-04 15:01:43.720638930 +0100
***************
*** 347,360 ****
  N  *+byte_offset*     support for 'o' flag in 'statusline' option, "go"
                        and ":goto" commands.
  m  *+channel*         inter process communication |channel|
! 6  *+cindent*         |'cindent'|, C indenting
  N  *+clientserver*    Unix and Win32: Remote invocation |clientserver|
     *+clipboard*               |clipboard| support compiled-in
     *+clipboard_working*       |clipboard| support compiled-in and working
  T  *+cmdline_compl*   command line completion |cmdline-completion|
  T  *+cmdline_hist*    command line history |cmdline-history|
  N  *+cmdline_info*    |'showcmd'| and |'ruler'|
! S  *+cmdwin*          |cmdline-window| support
  T  *+comments*                |'comments'| support
  B  *+conceal*         "conceal" support, see |conceal| |:syn-conceal| etc.
  N  *+cryptv*          encryption support |encryption|
--- 349,362 ----
  N  *+byte_offset*     support for 'o' flag in 'statusline' option, "go"
                        and ":goto" commands.
  m  *+channel*         inter process communication |channel|
! T  *+cindent*         |'cindent'|, C indenting; Always enabled
  N  *+clientserver*    Unix and Win32: Remote invocation |clientserver|
     *+clipboard*               |clipboard| support compiled-in
     *+clipboard_working*       |clipboard| support compiled-in and working
  T  *+cmdline_compl*   command line completion |cmdline-completion|
  T  *+cmdline_hist*    command line history |cmdline-history|
  N  *+cmdline_info*    |'showcmd'| and |'ruler'|
! T  *+cmdwin*          |cmdline-window| support; Always enabled since 9.0.0657
  T  *+comments*                |'comments'| support
  B  *+conceal*         "conceal" support, see |conceal| |:syn-conceal| etc.
  N  *+cryptv*          encryption support |encryption|
*** ../vim-9.0.0656/runtime/doc/cmdline.txt     2022-08-25 16:02:09.673816447 
+0100
--- runtime/doc/cmdline.txt     2022-10-04 15:49:21.164888297 +0100
***************
*** 1124,1130 ****
  In the command-line window the command line can be edited just like editing
  text in any window.  It is a special kind of window, because you cannot leave
  it in a normal way.
- {not available when compiled without the |+cmdwin| feature}
  
  
  OPEN                                          *c_CTRL-F* *q:* *q/* *q?*
--- 1124,1129 ----
***************
*** 1144,1149 ****
--- 1143,1150 ----
  
  Vim will be in Normal mode when the editor is opened, except when 'insertmode'
  is set.
+                                                               *E1292*
+ Once a command-line window is open it is not possible to open another one.
  
  The height of the window is specified with 'cmdwinheight' (or smaller if there
  is no room).  The window is always full width and is positioned just above the
*** ../vim-9.0.0656/src/feature.h       2022-09-17 21:07:52.087993184 +0100
--- src/feature.h       2022-10-04 15:41:53.722148512 +0100
***************
*** 31,53 ****
   * Basic choices:
   * ==============
   *
!  * +tiny              almost no features enabled, not even multiple windows
!  * +small             as tiny plus cmdline window
!  * +normal            A default selection of features enabled
!  * +big                       many features enabled, as rich as possible.
   * +huge              all possible features enabled.
   *
!  * When +small is used, +tiny is also included.  +normal implies +small, etc.
   */
  
  /*
   * Uncomment one of these to override the default.  For unix use a configure
   * argument, see Makefile.
   */
! #if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
        && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
  // #define FEAT_TINY
- // #define FEAT_SMALL
  // #define FEAT_NORMAL
  // #define FEAT_BIG
  // #define FEAT_HUGE
--- 31,61 ----
   * Basic choices:
   * ==============
   *
!  * +tiny              no optional features enabled, not even +eval
!  * +normal            a default selection of features enabled
!  * +big                       many features enabled, except "expensive" ones
   * +huge              all possible features enabled.
   *
!  * When +normal is used, +tiny is also included.  +big implies +normal, etc.
   */
  
  /*
+  * +small is now an alias for +tiny
+  */
+ #if defined(FEAT_SMALL)
+ # undef FEAT_SMALL
+ # if !defined(FEAT_TINY)
+ #  define FEAT_TINY
+ # endif
+ #endif
+ 
+ /*
   * Uncomment one of these to override the default.  For unix use a configure
   * argument, see Makefile.
   */
! #if !defined(FEAT_TINY) && !defined(FEAT_NORMAL) \
        && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
  // #define FEAT_TINY
  // #define FEAT_NORMAL
  // #define FEAT_BIG
  // #define FEAT_HUGE
***************
*** 59,65 ****
   * Use +big for older systems: VMS and Amiga.
   * Otherwise use +normal
   */
! #if !defined(FEAT_TINY) && !defined(FEAT_SMALL) && !defined(FEAT_NORMAL) \
        && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
  # if defined(UNIX) || defined(MSWIN) || defined(MACOS_X)
  #  define FEAT_HUGE
--- 67,73 ----
   * Use +big for older systems: VMS and Amiga.
   * Otherwise use +normal
   */
! #if !defined(FEAT_TINY) && !defined(FEAT_NORMAL) \
        && !defined(FEAT_BIG) && !defined(FEAT_HUGE)
  # if defined(UNIX) || defined(MSWIN) || defined(MACOS_X)
  #  define FEAT_HUGE
***************
*** 82,90 ****
  # define FEAT_NORMAL
  #endif
  #ifdef FEAT_NORMAL
- # define FEAT_SMALL
- #endif
- #ifdef FEAT_SMALL
  # define FEAT_TINY
  #endif
  
--- 90,95 ----
***************
*** 122,127 ****
--- 127,133 ----
   * +wildmenu          'wildmenu' option
   * +builtin_terms     all builtin termcap entries included
   * +float             Floating point variables.
+  * +cmdwin            Command line window.
   *
   * Obsolete:
   * +tag_old_static    Old style static tags: "file:tag  file  ..".
***************
*** 137,146 ****
   */
  #define MAX_MSG_HIST_LEN 200
  
- #if defined(FEAT_SMALL)
- # define FEAT_CMDWIN
- #endif
- 
  /*
   * +folding           Fold lines.
   */
--- 143,148 ----
***************
*** 915,921 ****
  # define FEAT_DND
  #endif
  
! #if defined(FEAT_GUI_MSWIN) && defined(FEAT_SMALL)
  # define MSWIN_FIND_REPLACE   // include code for find/replace dialog
  # define MSWIN_FR_BUFSIZE 256
  #endif
--- 917,923 ----
  # define FEAT_DND
  #endif
  
! #if defined(FEAT_GUI_MSWIN)
  # define MSWIN_FIND_REPLACE   // include code for find/replace dialog
  # define MSWIN_FR_BUFSIZE 256
  #endif
*** ../vim-9.0.0656/src/INSTALLvms.txt  2020-11-25 11:02:21.000000000 +0000
--- src/INSTALLvms.txt  2022-10-04 15:20:44.589510488 +0100
***************
*** 77,85 ****
  
        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
                          NORMAL  - A default selection of features enabled
                          BIG     - Many features enabled, as rich as possible.
                          (OpenVMS default)
--- 77,83 ----
  
        Parameter name  : MODEL
        Description     : Build model selection
!       Options:        : TINY    - No optional features enabled
                          NORMAL  - A default selection of features enabled
                          BIG     - Many features enabled, as rich as possible.
                          (OpenVMS default)
*** ../vim-9.0.0656/src/Make_ami.mak    2022-09-25 19:36:33.959576254 +0100
--- src/Make_ami.mak    2022-10-04 15:23:39.297092299 +0100
***************
*** 45,53 ****
        -DFEAT_NORMAL
  else
  
! # Vim 'small' build
  ifeq ($(BUILD),small)
! CFLAGS += -DFEAT_SMALL
  else
  
  # Vim 'tiny' build
--- 45,53 ----
        -DFEAT_NORMAL
  else
  
! # Vim 'small' build - now an alias for 'tiny'
  ifeq ($(BUILD),small)
! CFLAGS += -DFEAT_TINY
  else
  
  # Vim 'tiny' build
*** ../vim-9.0.0656/src/Make_cyg_ming.mak       2022-09-22 16:11:47.277127598 
+0100
--- src/Make_cyg_ming.mak       2022-10-04 15:24:26.136975962 +0100
***************
*** 28,35 ****
  # Updated 2014 Oct 13.
  
  #>>>>> choose options:
! # FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
! # Set to TINY to make minimal version (few features).
  FEATURES=HUGE
  
  # Set to yes for a debug build.
--- 28,35 ----
  # Updated 2014 Oct 13.
  
  #>>>>> choose options:
! # 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.
*** ../vim-9.0.0656/src/Make_mvc.mak    2022-09-22 16:11:47.277127598 +0100
--- src/Make_mvc.mak    2022-10-04 15:25:59.216740507 +0100
***************
*** 16,22 ****
  #
  #     !!!!  After changing any features do "nmake clean" first  !!!!
  #
! #     Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, HUGE] (default is HUGE)
  #
  #     Name to add to the version: MODIFIED_BY=[name of modifier]
  #
--- 16,22 ----
  #
  #     !!!!  After changing any features do "nmake clean" first  !!!!
  #
! #     Feature Set: FEATURES=[TINY, NORMAL, BIG, HUGE] (default is HUGE)
  #
  #     Name to add to the version: MODIFIED_BY=[name of modifier]
  #
***************
*** 1124,1130 ****
  !endif # POSTSCRIPT
  
  #
! # FEATURES: TINY, SMALL, NORMAL, BIG or HUGE
  #
  CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
  
--- 1124,1130 ----
  !endif # POSTSCRIPT
  
  #
! # FEATURES: TINY, NORMAL, BIG or HUGE
  #
  CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
  
*** ../vim-9.0.0656/src/Make_vms.mms    2022-01-31 11:59:27.000000000 +0000
--- src/Make_vms.mms    2022-10-04 15:26:20.148686835 +0100
***************
*** 27,34 ****
  DECC = YES
  
  # Build model selection
! # TINY   - Almost no features enabled, not even multiple windows
! # SMALL  - Few features enabled, as basic as possible
  # NORMAL - A default selection of features enabled
  # BIG    - Many features enabled, as rich as possible. (default)
  # HUGE   - All possible features enabled.
--- 27,33 ----
  DECC = YES
  
  # Build model selection
! # 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.
*** ../vim-9.0.0656/src/Makefile        2022-09-26 16:02:43.733419780 +0100
--- src/Makefile        2022-10-04 16:21:52.878163155 +0100
***************
*** 386,392 ****
  # "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.
  #CONF_OPT_LUA = --enable-luainterp
  #CONF_OPT_LUA = --enable-luainterp=dynamic
  #CONF_OPT_LUA = --enable-luainterp --with-luajit
--- 386,392 ----
  # "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" doesn't work.
  #CONF_OPT_LUA = --enable-luainterp
  #CONF_OPT_LUA = --enable-luainterp=dynamic
  #CONF_OPT_LUA = --enable-luainterp --with-luajit
***************
*** 415,428 ****
  # 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.
  #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.
  # 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
--- 415,428 ----
  # 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" 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" 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,450 ****
  # 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.
  #CONF_OPT_RUBY = --enable-rubyinterp
  #CONF_OPT_RUBY = --enable-rubyinterp=dynamic
  #CONF_OPT_RUBY = --enable-rubyinterp --with-ruby-command=ruby1.9.1
--- 444,450 ----
  # 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" 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,458 ****
--- 453,459 ----
  # 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,536 ****
  # 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
--- 531,536 ----
*** ../vim-9.0.0656/src/configure.ac    2022-09-22 16:11:47.277127598 +0100
--- src/configure.ac    2022-10-04 15:32:34.611694696 +0100
***************
*** 522,536 ****
  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)],
        features="$withval"; AC_MSG_RESULT($features),
        features="huge"; AC_MSG_RESULT(Defaulting to huge))
  
  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";
--- 522,540 ----
  dnl Check user requested features.
  
  AC_MSG_CHECKING(--with-features argument)
! 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) ;;
    normal)     AC_DEFINE(FEAT_NORMAL) dovimdiff="installvimdiff";
                        dogvimdiff="installgvimdiff" ;;
    big)                AC_DEFINE(FEAT_BIG) dovimdiff="installvimdiff";
***************
*** 543,549 ****
  AC_SUBST(dovimdiff)
  AC_SUBST(dogvimdiff)
  
! if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
    has_eval=no
  else
    has_eval=yes
--- 547,553 ----
  AC_SUBST(dovimdiff)
  AC_SUBST(dogvimdiff)
  
! if test "x$features" = "xtiny"; then
    has_eval=no
  else
    has_eval=yes
***************
*** 577,583 ****
  fi
  
  AC_MSG_CHECKING([diff feature])
! if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
    AC_MSG_RESULT([disabled in $features version])
  else
    AC_MSG_RESULT(enabled)
--- 581,587 ----
  fi
  
  AC_MSG_CHECKING([diff feature])
! if test "x$features" = "xtiny"; then
    AC_MSG_RESULT([disabled in $features version])
  else
    AC_MSG_RESULT(enabled)
***************
*** 595,601 ****
  
  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])
    fi
  
    dnl -- find the lua executable
--- 599,605 ----
  
  if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
    if test "$has_eval" = "no"; then
!     AC_MSG_ERROR([cannot use Lua with tiny features])
    fi
  
    dnl -- find the lua executable
***************
*** 1082,1088 ****
  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])
    fi
    AC_SUBST(vi_cv_path_perl)
    AC_PATH_PROG(vi_cv_path_perl, perl)
--- 1086,1092 ----
  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 features])
    fi
    AC_SUBST(vi_cv_path_perl)
    AC_PATH_PROG(vi_cv_path_perl, perl)
***************
*** 1231,1237 ****
  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])
    fi
  
    dnl -- find the python executable
--- 1235,1241 ----
  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 features])
    fi
  
    dnl -- find the python executable
***************
*** 1466,1472 ****
  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])
    fi
  
    dnl -- find the python3 executable
--- 1470,1476 ----
  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 features])
    fi
  
    dnl -- find the python3 executable
***************
*** 1979,1985 ****
  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])
    fi
  
    AC_MSG_CHECKING(--with-ruby-command argument)
--- 1983,1989 ----
  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 features])
    fi
  
    AC_MSG_CHECKING(--with-ruby-command argument)
***************
*** 2092,2098 ****
        , [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])
      enable_netbeans="no"
    else
      AC_MSG_RESULT(no)
--- 2096,2102 ----
        , [enable_netbeans="yes"])
  if test "$enable_netbeans" = "yes"; then
    if test "$has_eval" = "no"; then
!     AC_MSG_RESULT([cannot use NetBeans with tiny features])
      enable_netbeans="no"
    else
      AC_MSG_RESULT(no)
***************
*** 2107,2113 ****
        , [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])
      enable_channel="no"
    else
      AC_MSG_RESULT(no)
--- 2111,2117 ----
        , [enable_channel="yes"])
  if test "$enable_channel" = "yes"; then
    if test "$has_eval" = "no"; then
!     AC_MSG_RESULT([cannot use channels with tiny features])
      enable_channel="no"
    else
      AC_MSG_RESULT(no)
***************
*** 2215,2221 ****
        , [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])
      enable_terminal="no"
    else
      if test "$enable_terminal" = "auto"; then
--- 2219,2225 ----
        , [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 features])
      enable_terminal="no"
    else
      if test "$enable_terminal" = "auto"; then
***************
*** 3722,3728 ****
    fi
  else
    if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
!     AC_MSG_RESULT([cannot use sound with tiny or small features])
      enable_canberra="no"
    else
      AC_MSG_RESULT($enable_canberra)
--- 3726,3732 ----
    fi
  else
    if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
!     AC_MSG_RESULT([cannot use sound with tiny features])
      enable_canberra="no"
    else
      AC_MSG_RESULT($enable_canberra)
***************
*** 4432,4438 ****
      else
        AC_MSG_RESULT([msgfmt not found - disabled]);
      fi
!     if test $have_gettext = "yes" -a "x$features" != "xtiny" -a "x$features" 
!= "xsmall"; then
        AC_DEFINE(HAVE_GETTEXT)
        MAKEMO=yes
        AC_SUBST(MAKEMO)
--- 4436,4442 ----
      else
        AC_MSG_RESULT([msgfmt not found - disabled]);
      fi
!     if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
        AC_DEFINE(HAVE_GETTEXT)
        MAKEMO=yes
        AC_SUBST(MAKEMO)
*** ../vim-9.0.0656/src/auto/configure  2022-09-22 16:11:47.277127598 +0100
--- src/auto/configure  2022-10-04 15:32:36.495689583 +0100
***************
*** 1523,1529 ****
    --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-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.
--- 1523,1529 ----
    --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, 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,5231 ****
  fi
  
  
  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" ;;
--- 5219,5233 ----
  fi
  
  
+ case "$features" in
+   small) features="tiny" ;;
+ esac
+ 
  dovimdiff=""
  dogvimdiff=""
  case "$features" in
    tiny)               $as_echo "#define FEAT_TINY 1" >>confdefs.h
   ;;
    normal)     $as_echo "#define FEAT_NORMAL 1" >>confdefs.h
   dovimdiff="installvimdiff";
                        dogvimdiff="installgvimdiff" ;;
***************
*** 5242,5248 ****
  
  
  
! if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
    has_eval=no
  else
    has_eval=yes
--- 5244,5250 ----
  
  
  
! if test "x$features" = "xtiny"; then
    has_eval=no
  else
    has_eval=yes
***************
*** 5300,5306 ****
  
  { $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
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled in $features 
version" >&5
  $as_echo "disabled in $features version" >&6; }
  else
--- 5302,5308 ----
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking diff feature" >&5
  $as_echo_n "checking diff feature... " >&6; }
! 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,5332 ****
  
  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
    fi
  
  
--- 5328,5334 ----
  
  if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
    if test "$has_eval" = "no"; then
!     as_fn_error $? "cannot use Lua with tiny features" "$LINENO" 5
    fi
  
  
***************
*** 6096,6102 ****
  $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
    fi
  
    # Extract the first word of "perl", so it can be a program name with args.
--- 6098,6104 ----
  $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 features" "$LINENO" 5
    fi
  
    # Extract the first word of "perl", so it can be a program name with args.
***************
*** 6301,6307 ****
  $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
    fi
  
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python-command 
argument" >&5
--- 6303,6309 ----
  $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 features" "$LINENO" 5
    fi
  
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python-command 
argument" >&5
***************
*** 6652,6658 ****
  $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
    fi
  
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python3-command 
argument" >&5
--- 6654,6660 ----
  $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 features" "$LINENO" 5
    fi
  
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python3-command 
argument" >&5
***************
*** 7580,7586 ****
  $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
    fi
  
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command 
argument" >&5
--- 7582,7588 ----
  $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 features" "$LINENO" 5
    fi
  
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command 
argument" >&5
***************
*** 7758,7765 ****
  
  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; }
      enable_netbeans="no"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--- 7760,7767 ----
  
  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 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,7788 ****
  
  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; }
      enable_channel="no"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--- 7783,7790 ----
  
  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 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,8092 ****
  
  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; }
      enable_terminal="no"
    else
      if test "$enable_terminal" = "auto"; then
--- 8087,8094 ----
  
  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 features" >&5
! $as_echo "cannot use terminal emulator with tiny features" >&6; }
      enable_terminal="no"
    else
      if test "$enable_terminal" = "auto"; then
***************
*** 12892,12899 ****
    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; }
      enable_canberra="no"
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
--- 12894,12901 ----
    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 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,14727 ****
        { $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
        $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
  
        MAKEMO=yes
--- 14723,14729 ----
        { $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"; then
        $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
  
        MAKEMO=yes
*** ../vim-9.0.0656/src/config.h.in     2022-09-17 21:07:52.091993174 +0100
--- src/config.h.in     2022-10-04 15:33:36.511526289 +0100
***************
*** 319,327 ****
  /* 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
  
--- 319,324 ----
*** ../vim-9.0.0656/src/if_mzsch.c      2022-09-17 21:07:52.099993159 +0100
--- src/if_mzsch.c      2022-10-04 15:43:16.009917662 +0100
***************
*** 17,23 ****
   * 1. Memory, allocated with scheme_malloc*, need not to be freed explicitly,
   *    garbage collector will do it self
   * 2. Requires at least NORMAL features. I can't imagine why one may want
!  *    to build with SMALL or TINY features but with MzScheme interface.
   * 3. I don't use K&R-style functions. Anyways, MzScheme headers are ANSI.
   */
  
--- 17,23 ----
   * 1. Memory, allocated with scheme_malloc*, need not to be freed explicitly,
   *    garbage collector will do it self
   * 2. Requires at least NORMAL features. I can't imagine why one may want
!  *    to build with TINY features but with MzScheme interface.
   * 3. I don't use K&R-style functions. Anyways, MzScheme headers are ANSI.
   */
  
*** ../vim-9.0.0656/src/testdir/Make_all.mak    2022-10-02 12:58:31.509276685 
+0100
--- src/testdir/Make_all.mak    2022-10-04 15:45:27.321548352 +0100
***************
*** 10,16 ****
  # File to delete when testing starts
  CLEANUP_FILES = test.log messages starttime
  
! # Tests for tiny and small builds.
  SCRIPTS_TINY = \
        test10 \
        test20 \
--- 10,16 ----
  # File to delete when testing starts
  CLEANUP_FILES = test.log messages starttime
  
! # Tests for tiny build.
  SCRIPTS_TINY = \
        test10 \
        test20 \
*** ../vim-9.0.0656/src/version.c       2022-10-04 14:34:42.116964799 +0100
--- src/version.c       2022-10-04 15:47:08.409263335 +0100
***************
*** 2337,2344 ****
      msg_puts(_("\nBig version "));
  #elif defined(FEAT_NORMAL)
      msg_puts(_("\nNormal version "));
- #elif defined(FEAT_SMALL)
-     msg_puts(_("\nSmall version "));
  #else
      msg_puts(_("\nTiny version "));
  #endif
--- 2339,2344 ----
*** ../vim-9.0.0656/src/vim.h   2022-09-30 11:04:47.165344527 +0100
--- src/vim.h   2022-10-04 15:48:42.904996463 +0100
***************
*** 159,172 ****
  
  /*
   * #defines for optionals and features
!  * Also defines FEAT_TINY, FEAT_SMALL, etc. when FEAT_HUGE is defined.
   */
  #include "feature.h"
  
! #if defined(MACOS_X_DARWIN)
! # if defined(FEAT_SMALL) && !defined(FEAT_CLIPBOARD)
! #  define FEAT_CLIPBOARD
! # endif
  #endif
  
  // +x11 is only enabled when it's both available and wanted.
--- 159,170 ----
  
  /*
   * #defines for optionals and features
!  * Also defines FEAT_TINY, FEAT_NORMAL, etc. when FEAT_HUGE is defined.
   */
  #include "feature.h"
  
! #if defined(MACOS_X_DARWIN) && !defined(FEAT_CLIPBOARD)
! # define FEAT_CLIPBOARD
  #endif
  
  // +x11 is only enabled when it's both available and wanted.
*** ../vim-9.0.0656/src/arglist.c       2022-09-18 13:06:36.461124371 +0100
--- src/arglist.c       2022-10-04 15:49:21.164888297 +0100
***************
*** 1186,1198 ****
      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"
--- 1186,1196 ----
*** ../vim-9.0.0656/src/drawline.c      2022-10-03 20:00:49.396319098 +0100
--- src/drawline.c      2022-10-04 15:49:21.168888285 +0100
***************
*** 156,166 ****
  
  // 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
  #ifdef FEAT_FOLDING
  # define WL_FOLD      (WL_CMDLINE + 1)        // 'foldcolumn'
  #else
--- 156,162 ----
  
  // draw_state values for items that are drawn in sequence:
  #define WL_START      0               // nothing done yet, must be zero
! #define WL_CMDLINE    (WL_START + 1)  // cmdline window column
  #ifdef FEAT_FOLDING
  # define WL_FOLD      (WL_CMDLINE + 1)        // 'foldcolumn'
  #else
***************
*** 1678,1684 ****
                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;
--- 1674,1679 ----
***************
*** 1692,1698 ****
                                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)
            {
--- 1687,1692 ----
*** ../vim-9.0.0656/src/drawscreen.c    2022-10-04 14:34:42.112964811 +0100
--- src/drawscreen.c    2022-10-04 15:49:21.168888285 +0100
***************
*** 1102,1108 ****
  
      // 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;
--- 1102,1107 ----
***************
*** 1111,1117 ****
            ScreenLinesUC[off] = 0;
        ++col;
      }
- #endif
  
  #ifdef FEAT_RIGHTLEFT
  # define RL_MEMSET(p, v, l) \
--- 1110,1115 ----
*** ../vim-9.0.0656/src/edit.c  2022-09-27 16:27:56.096237761 +0100
--- src/edit.c  2022-10-04 15:49:21.168888285 +0100
***************
*** 785,791 ****
            // FALLTHROUGH
  
        case Ctrl_C:    // End input mode
- #ifdef FEAT_CMDWIN
            if (c == Ctrl_C && cmdwin_type != 0)
            {
                // Close the cmdline window.
--- 785,790 ----
***************
*** 794,800 ****
                nomove = TRUE;
                goto doESCkey;
            }
- #endif
  #ifdef FEAT_JOB_CHANNEL
            if (c == Ctrl_C && bt_prompt(curbuf))
            {
--- 793,798 ----
***************
*** 1196,1209 ****
                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))
            {
--- 1194,1205 ----
*** ../vim-9.0.0656/src/errors.h        2022-10-02 12:58:31.509276685 +0100
--- src/errors.h        2022-10-04 15:49:21.168888285 +0100
***************
*** 15,24 ****
  
  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[]
--- 15,22 ----
***************
*** 461,470 ****
  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[]
--- 459,466 ----
***************
*** 3012,3018 ****
  #endif
  EXTERN char e_failed_to_source_defaults[]
        INIT(= N_("E1187: Failed to source defaults.vim"));
! #if defined(FEAT_TERMINAL) && defined(FEAT_CMDWIN)
  EXTERN char e_cannot_open_terminal_from_command_line_window[]
        INIT(= N_("E1188: Cannot open a terminal from the command line 
window"));
  #endif
--- 3008,3014 ----
  #endif
  EXTERN char e_failed_to_source_defaults[]
        INIT(= N_("E1187: Failed to source defaults.vim"));
! #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,3300 ****
  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"));
--- 3287,3294 ----
*** ../vim-9.0.0656/src/evalfunc.c      2022-09-30 17:57:32.543287031 +0100
--- src/evalfunc.c      2022-10-04 15:49:21.168888285 +0100
***************
*** 5582,5594 ****
                },
        {"cmdline_compl", 1},
        {"cmdline_hist", 1},
!       {"cmdwin",
! #ifdef FEAT_CMDWIN
!               1
! #else
!               0
! #endif
!               },
        {"comments", 1},
        {"conceal",
  #ifdef FEAT_CONCEAL
--- 5582,5588 ----
                },
        {"cmdline_compl", 1},
        {"cmdline_hist", 1},
!       {"cmdwin", 1},
        {"comments", 1},
        {"conceal",
  #ifdef FEAT_CONCEAL
*** ../vim-9.0.0656/src/evalwindow.c    2022-08-31 11:25:02.815996919 +0100
--- src/evalwindow.c    2022-10-04 15:49:21.168888285 +0100
***************
*** 821,833 ****
        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)
      {
--- 821,831 ----
***************
*** 1065,1074 ****
      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 *)
--- 1063,1070 ----
***************
*** 1085,1098 ****
  {
      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
  }
  
  /*
--- 1081,1092 ----
*** ../vim-9.0.0656/src/ex_cmds.c       2022-10-03 16:05:25.021469286 +0100
--- src/ex_cmds.c       2022-10-04 15:49:21.172888274 +0100
***************
*** 2739,2750 ****
        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.
--- 2739,2749 ----
        if (buf != curbuf)
        {
            bufref_T    save_au_new_curbuf;
            int         save_cmdwin_type = cmdwin_type;
  
            // BufLeave applies to the old buffer.
            cmdwin_type = 0;
! 
            /*
             * Be careful: The autocommands may delete any buffer and change
             * the current buffer.
***************
*** 2760,2768 ****
            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
--- 2759,2765 ----
*** ../vim-9.0.0656/src/ex_docmd.c      2022-10-02 12:58:31.509276685 +0100
--- src/ex_docmd.c      2022-10-04 15:52:42.257246255 +0100
***************
*** 2083,2096 ****
  
        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
--- 2083,2094 ----
***************
*** 5849,5861 ****
  {
      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())
      {
--- 5847,5857 ----
***************
*** 5934,5940 ****
      static void
  ex_quit_all(exarg_T *eap)
  {
- # ifdef FEAT_CMDWIN
      if (cmdwin_type != 0)
      {
        if (eap->forceit)
--- 5930,5935 ----
***************
*** 5943,5949 ****
            cmdwin_result = K_XF2;
        return;
      }
- # endif
  
      // Don't quit while editing the command line.
      if (text_locked())
--- 5938,5943 ----
***************
*** 5969,5979 ****
  {
      win_T     *win;
      int               winnr = 0;
- #ifdef FEAT_CMDWIN
      if (cmdwin_type != 0)
        cmdwin_result = Ctrl_C;
      else
- #endif
        if (!text_locked() && !curbuf_locked())
        {
            if (eap->addr_count == 0)
--- 5963,5971 ----
***************
*** 6189,6221 ****
      tabpage_T *tp;
      int               tab_number;
  
- # ifdef FEAT_CMDWIN
      if (cmdwin_type != 0)
        cmdwin_result = K_IGNORE;
      else
! # endif
!       if (first_tabpage->tp_next == NULL)
!           emsg(_(e_cannot_close_last_tab_page));
!       else
        {
!           tab_number = get_tabpage_arg(eap);
!           if (eap->errmsg == NULL)
            {
!               tp = find_tabpage(tab_number);
!               if (tp == NULL)
!               {
!                   beep_flush();
!                   return;
!               }
!               if (tp != curtab)
!               {
!                   tabpage_close_other(tp, eap->forceit);
!                   return;
!               }
!               else if (!text_locked() && !curbuf_locked())
!                   tabpage_close(eap->forceit);
            }
        }
  }
  
  /*
--- 6181,6210 ----
      tabpage_T *tp;
      int               tab_number;
  
      if (cmdwin_type != 0)
        cmdwin_result = K_IGNORE;
+     else if (first_tabpage->tp_next == NULL)
+       emsg(_(e_cannot_close_last_tab_page));
      else
!     {
!       tab_number = get_tabpage_arg(eap);
!       if (eap->errmsg == NULL)
        {
!           tp = find_tabpage(tab_number);
!           if (tp == NULL)
            {
!               beep_flush();
!               return;
!           }
!           if (tp != curtab)
!           {
!               tabpage_close_other(tp, eap->forceit);
!               return;
            }
+           else if (!text_locked() && !curbuf_locked())
+               tabpage_close(eap->forceit);
        }
+     }
  }
  
  /*
***************
*** 6228,6265 ****
      int               done;
      int               tab_number;
  
- # ifdef FEAT_CMDWIN
      if (cmdwin_type != 0)
        cmdwin_result = K_IGNORE;
      else
! # endif
!       if (first_tabpage->tp_next == NULL)
!           msg(_("Already only one tab page"));
!       else
        {
!           tab_number = get_tabpage_arg(eap);
!           if (eap->errmsg == NULL)
            {
!               goto_tabpage(tab_number);
!               // Repeat this up to a 1000 times, because autocommands may
!               // mess up the lists.
!               for (done = 0; done < 1000; ++done)
!               {
!                   FOR_ALL_TABPAGES(tp)
!                       if (tp->tp_topframe != topframe)
!                       {
!                           tabpage_close_other(tp, eap->forceit);
!                           // if we failed to close it quit
!                           if (valid_tabpage(tp))
!                               done = 1000;
!                           // start over, "tp" is now invalid
!                           break;
!                       }
!                   if (first_tabpage->tp_next == NULL)
                        break;
!               }
            }
        }
  }
  
  /*
--- 6217,6251 ----
      int               done;
      int               tab_number;
  
      if (cmdwin_type != 0)
        cmdwin_result = K_IGNORE;
+     else if (first_tabpage->tp_next == NULL)
+       msg(_("Already only one tab page"));
      else
!     {
!       tab_number = get_tabpage_arg(eap);
!       if (eap->errmsg == NULL)
        {
!           goto_tabpage(tab_number);
!           // Repeat this up to a 1000 times, because autocommands may
!           // mess up the lists.
!           for (done = 0; done < 1000; ++done)
            {
!               FOR_ALL_TABPAGES(tp)
!                   if (tp->tp_topframe != topframe)
!                   {
!                       tabpage_close_other(tp, eap->forceit);
!                       // if we failed to close it quit
!                       if (valid_tabpage(tp))
!                           done = 1000;
!                       // start over, "tp" is now invalid
                        break;
!                   }
!               if (first_tabpage->tp_next == NULL)
!                   break;
            }
        }
+     }
  }
  
  /*
***************
*** 6403,6415 ****
      if (not_in_vim9(eap) == FAIL)
        return;
  #endif
- #ifdef FEAT_CMDWIN
      if (cmdwin_type != 0)
      {
        cmdwin_result = Ctrl_C;
        return;
      }
- #endif
      // Don't quit while editing the command line.
      if (text_locked())
      {
--- 6389,6399 ----
*** ../vim-9.0.0656/src/ex_getln.c      2022-09-18 15:03:18.351501363 +0100
--- src/ex_getln.c      2022-10-04 15:49:21.172888274 +0100
***************
*** 52,67 ****
  static int    cmdline_paste(int regname, int literally, int remcr);
  static void   redrawcmdprompt(void);
  static int    ccheck_abbr(int);
  #ifdef FEAT_SEARCH_EXTRA
  static int    empty_pattern_magic(char_u *pat, size_t len, magic_T magic_val);
  #endif
  
- #ifdef FEAT_CMDWIN
- static int    open_cmdwin(void);
- 
  static int    cedit_key = -1; // key value of 'cedit' option
- #endif
- 
  
      static void
  trigger_cmd_autocmd(int typechar, int evt)
--- 52,63 ----
  static int    cmdline_paste(int regname, int literally, int remcr);
  static void   redrawcmdprompt(void);
  static int    ccheck_abbr(int);
+ static int    open_cmdwin(void);
  #ifdef FEAT_SEARCH_EXTRA
  static int    empty_pattern_magic(char_u *pat, size_t len, magic_T magic_val);
  #endif
  
  static int    cedit_key = -1; // key value of 'cedit' option
  
      static void
  trigger_cmd_autocmd(int typechar, int evt)
***************
*** 1922,1928 ****
                                        // cmdline_handle_backslash_key()
        }
  
- #ifdef FEAT_CMDWIN
        if (c == cedit_key || c == K_CMDWIN)
        {
            // TODO: why is ex_normal_busy checked here?
--- 1918,1923 ----
***************
*** 1935,1945 ****
                some_key_typed = TRUE;
            }
        }
- # ifdef FEAT_DIGRAPHS
-       else
- # endif
- #endif
  #ifdef FEAT_DIGRAPHS
            c = do_digraph(c);
  #endif
  
--- 1930,1937 ----
                some_key_typed = TRUE;
            }
        }
  #ifdef FEAT_DIGRAPHS
+       else
            c = do_digraph(c);
  #endif
  
***************
*** 2687,2696 ****
      int
  text_locked(void)
  {
- #ifdef FEAT_CMDWIN
      if (cmdwin_type != 0)
        return TRUE;
- #endif
      return textlock != 0;
  }
  
--- 2679,2686 ----
***************
*** 2707,2716 ****
      char *
  get_text_locked_msg(void)
  {
- #ifdef FEAT_CMDWIN
      if (cmdwin_type != 0)
        return e_invalid_in_cmdline_window;
- #endif
      return e_not_allowed_to_change_text_or_change_window;
  }
  
--- 2697,2704 ----
***************
*** 4080,4086 ****
      return &ccline;
  }
  
- #if defined(FEAT_EVAL) || defined(FEAT_CMDWIN) || defined(PROTO)
  /*
   * Get pointer to the command line info to use. save_cmdline() may clear
   * ccline and put the previous value in prev_ccline.
--- 4068,4073 ----
***************
*** 4096,4104 ****
        return &prev_ccline;
      return NULL;
  }
- #endif
  
- #if defined(FEAT_EVAL) || defined(FEAT_CMDWIN)
  /*
   * Get the current command-line type.
   * Returns ':' or '/' or '?' or '@' or '>' or '-'
--- 4083,4089 ----
***************
*** 4120,4126 ****
            '-';
      return p->cmdfirstc;
  }
- #endif
  
  #if defined(FEAT_EVAL) || defined(PROTO)
  /*
--- 4105,4110 ----
***************
*** 4365,4371 ****
      return OK;
  }
  
- #if defined(FEAT_CMDWIN) || defined(PROTO)
  /*
   * Check value of 'cedit' and set cedit_key.
   * Returns NULL if value is OK, error message otherwise.
--- 4349,4354 ----
***************
*** 4694,4700 ****
  {
      return cmdwin_type != 0 && get_cmdline_type() == NUL;
  }
- #endif // FEAT_CMDWIN
  
  /*
   * Used for commands that either take a simple command string argument, or:
--- 4677,4682 ----
*** ../vim-9.0.0656/src/getchar.c       2022-09-24 15:36:32.096990933 +0100
--- src/getchar.c       2022-10-04 15:54:34.421758581 +0100
***************
*** 3372,3380 ****
  
                if (ex_normal_busy > 0)
                {
- #ifdef FEAT_CMDWIN
                    static int tc = 0;
- #endif
  
                    // No typeahead left and inside ":normal".  Must return
                    // something to avoid getting stuck.  When an incomplete
--- 3372,3378 ----
***************
*** 3398,3413 ****
                        c = K_CANCEL;
  #endif
                    else if ((State & MODE_CMDLINE)
! #ifdef FEAT_CMDWIN
!                           || (cmdwin_type > 0 && tc == ESC)
! #endif
!                           )
                        c = Ctrl_C;
                    else
                        c = ESC;
- #ifdef FEAT_CMDWIN
                    tc = c;
- #endif
                    // set a flag to indicate this wasn't a normal char
                    if (advance)
                        typebuf_was_empty = TRUE;
--- 3396,3406 ----
                        c = K_CANCEL;
  #endif
                    else if ((State & MODE_CMDLINE)
!                                            || (cmdwin_type > 0 && tc == ESC))
                        c = Ctrl_C;
                    else
                        c = ESC;
                    tc = c;
                    // set a flag to indicate this wasn't a normal char
                    if (advance)
                        typebuf_was_empty = TRUE;
*** ../vim-9.0.0656/src/globals.h       2022-10-03 15:27:30.062072077 +0100
--- src/globals.h       2022-10-04 15:49:21.172888274 +0100
***************
*** 1637,1646 ****
  EXTERN int    km_stopsel INIT(= FALSE);
  EXTERN int    km_startsel INIT(= FALSE);
  
- #ifdef FEAT_CMDWIN
  EXTERN int    cmdwin_type INIT(= 0);  // type of cmdline window or 0
  EXTERN int    cmdwin_result INIT(= 0); // result of cmdline window or 0
- #endif
  
  EXTERN char_u no_lines_msg[]  INIT(= N_("--No lines in buffer--"));
  
--- 1637,1644 ----
***************
*** 1974,1983 ****
  // overrules p_magic.  Otherwise set to OPTION_MAGIC_NOT_SET.
  EXTERN optmagic_T magic_overruled INIT(= OPTION_MAGIC_NOT_SET);
  
- #ifdef FEAT_CMDWIN
  // Skip win_fix_cursor() call for 'splitkeep' when cmdwin is closed.
  EXTERN int skip_win_fix_cursor INIT(= FALSE);
- #endif
  // Skip win_fix_scroll() call for 'splitkeep' when closing tab page.
  EXTERN int skip_win_fix_scroll INIT(= FALSE);
  // Skip update_topline() call while executing win_fix_scroll().
--- 1972,1979 ----
*** ../vim-9.0.0656/src/gui.c   2022-09-06 17:00:11.351047779 +0100
--- src/gui.c   2022-10-04 15:49:21.176888264 +0100
***************
*** 3844,3854 ****
        return FALSE;
  
      // Don't put events in the input queue now.
!     if (hold_gui_events
! # ifdef FEAT_CMDWIN
!           || cmdwin_type != 0
! # endif
!           )
      {
        // Set it back to the current tab page.
        gui_mch_set_curtab(tabpage_index(curtab));
--- 3844,3850 ----
        return FALSE;
  
      // Don't put events in the input queue now.
!     if (hold_gui_events || cmdwin_type != 0)
      {
        // Set it back to the current tab page.
        gui_mch_set_curtab(tabpage_index(curtab));
***************
*** 3993,4002 ****
      if (hold_gui_events)
        return;
  
- #ifdef FEAT_CMDWIN
      if (cmdwin_type != 0 && sb->wp != curwin)
        return;
- #endif
  
      if (still_dragging)
      {
--- 3989,3996 ----
*** ../vim-9.0.0656/src/gui_gtk_x11.c   2022-10-01 15:46:59.540243953 +0100
--- src/gui_gtk_x11.c   2022-10-04 15:49:21.176888264 +0100
***************
*** 3311,3321 ****
  
        // When ignoring events return TRUE so that the selected page doesn't
        // change.
!       if (hold_gui_events
! # ifdef FEAT_CMDWIN
!               || cmdwin_type != 0
! # endif
!          )
            return TRUE;
  
        tabwin = gui_gtk_window_at_position(gui.mainwin, &x, &y);
--- 3311,3317 ----
  
        // When ignoring events return TRUE so that the selected page doesn't
        // change.
!       if (hold_gui_events || cmdwin_type != 0)
            return TRUE;
  
        tabwin = gui_gtk_window_at_position(gui.mainwin, &x, &y);
*** ../vim-9.0.0656/src/gui_motif.c     2022-09-04 12:29:22.144893115 +0100
--- src/gui_motif.c     2022-10-04 15:49:21.176888264 +0100
***************
*** 228,242 ****
        return;
      }
  
      if (event->button != Button3)
        return;
  
      // When ignoring events don't show the menu.
!     if (hold_gui_events
! # ifdef FEAT_CMDWIN
!           || cmdwin_type != 0
! # endif
!        )
        return;
  
      if (event->subwindow != None)
--- 228,246 ----
        return;
      }
  
+     if (event->button == Button2)
+     {
+       // Middle mouse click on tabpage label closes that tab.
+       XtVaGetValues(tabLine_menu, XmNuserData, &tab_idx, NULL);
+       send_tabline_menu_event(tab_idx, (int)TABLINE_MENU_CLOSE);
+       return;
+     }
+ 
      if (event->button != Button3)
        return;
  
      // When ignoring events don't show the menu.
!     if (hold_gui_events || cmdwin_type != 0)
        return;
  
      if (event->subwindow != None)
*** ../vim-9.0.0656/src/gui_w32.c       2022-09-26 20:48:28.683453345 +0100
--- src/gui_w32.c       2022-10-04 15:49:21.176888264 +0100
***************
*** 2609,2619 ****
      POINT         pt;
  
      // When ignoring events don't show the menu.
!     if (hold_gui_events
! # ifdef FEAT_CMDWIN
!           || cmdwin_type != 0
! # endif
!        )
        return;
  
      tab_pmenu = CreatePopupMenu();
--- 2609,2615 ----
      POINT         pt;
  
      // When ignoring events don't show the menu.
!     if (hold_gui_events || cmdwin_type != 0)
        return;
  
      tab_pmenu = CreatePopupMenu();
*** ../vim-9.0.0656/src/insexpand.c     2022-09-24 19:20:26.575649263 +0100
--- src/insexpand.c     2022-10-04 15:49:21.176888264 +0100
***************
*** 2293,2304 ****
        showmode();
      }
  
- #ifdef FEAT_CMDWIN
      if (c == Ctrl_C && cmdwin_type != 0)
        // Avoid the popup menu remains displayed when leaving the
        // command line window.
        update_screen(0);
- #endif
      // Indent now if a key was typed that is in 'cinkeys'.
      if (want_cindent && in_cinkeys(KEY_COMPLETE, ' ', inindent(0)))
        do_c_expr_indent();
--- 2293,2302 ----
*** ../vim-9.0.0656/src/main.c  2022-09-24 13:10:00.739938625 +0100
--- src/main.c  2022-10-04 15:49:21.176888264 +0100
***************
*** 1216,1226 ****
  #endif
  
      clear_oparg(&oa);
!     while (!cmdwin
! #ifdef FEAT_CMDWIN
!           || cmdwin_result == 0
! #endif
!           )
      {
        if (stuff_empty())
        {
--- 1216,1222 ----
  #endif
  
      clear_oparg(&oa);
!     while (!cmdwin || cmdwin_result == 0)
      {
        if (stuff_empty())
        {
*** ../vim-9.0.0656/src/map.c   2022-10-01 19:43:48.606494048 +0100
--- src/map.c   2022-10-04 15:49:21.176888264 +0100
***************
*** 2811,2818 ****
  #endif
  }
  
- #if defined(MSWIN) || defined(FEAT_CMDWIN) || defined(MACOS_X) \
-                                                            || defined(PROTO)
  /*
   * Add a mapping "map" for mode "mode".
   * When "nore" is TRUE use MAPTYPE_NOREMAP.
--- 2811,2816 ----
***************
*** 2833,2839 ****
      }
      p_cpo = cpo_save;
  }
- #endif
  
  #if defined(FEAT_LANGMAP) || defined(PROTO)
  /*
--- 2831,2836 ----
*** ../vim-9.0.0656/src/mouse.c 2022-08-24 19:27:41.648667087 +0100
--- src/mouse.c 2022-10-04 15:55:23.381939755 +0100
***************
*** 482,498 ****
                {
                    c1 = TabPageIdxs[mouse_col];
                    tabpage_move(c1 <= 0 ? 9999 : c1 < tabpage_index(curtab)
!                                                                   ? c1 - 1 : 
c1);
                }
                return FALSE;
            }
  
            // click in a tab selects that tab page
!           if (is_click
! # ifdef FEAT_CMDWIN
!                   && cmdwin_type == 0
! # endif
!                   && mouse_col < Columns)
            {
                in_tab_line = TRUE;
                c1 = TabPageIdxs[mouse_col];
--- 482,494 ----
                {
                    c1 = TabPageIdxs[mouse_col];
                    tabpage_move(c1 <= 0 ? 9999 : c1 < tabpage_index(curtab)
!                                                               ? c1 - 1 : c1);
                }
                return FALSE;
            }
  
            // click in a tab selects that tab page
!           if (is_click && cmdwin_type == 0 && mouse_col < Columns)
            {
                in_tab_line = TRUE;
                c1 = TabPageIdxs[mouse_col];
***************
*** 745,751 ****
      }
  #endif
  
! #if defined(FEAT_CLIPBOARD) && defined(FEAT_CMDWIN)
      if ((jump_flags & IN_OTHER_WIN) && !VIsual_active && clip_star.available)
      {
        clip_modeless(which_button, is_click, is_drag);
--- 741,747 ----
      }
  #endif
  
! #if defined(FEAT_CLIPBOARD)
      if ((jump_flags & IN_OTHER_WIN) && !VIsual_active && clip_star.available)
      {
        clip_modeless(which_button, is_click, is_drag);
***************
*** 1602,1608 ****
            end_visual_mode_keep_button();
            redraw_curbuf_later(UPD_INVERTED);  // delete the inversion
        }
! #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD)
        // Continue a modeless selection in another window.
        if (cmdwin_type != 0 && row < curwin->w_winrow)
            return IN_OTHER_WIN;
--- 1598,1604 ----
            end_visual_mode_keep_button();
            redraw_curbuf_later(UPD_INVERTED);  // delete the inversion
        }
! #if defined(FEAT_CLIPBOARD)
        // Continue a modeless selection in another window.
        if (cmdwin_type != 0 && row < curwin->w_winrow)
            return IN_OTHER_WIN;
***************
*** 1732,1741 ****
  # ifdef FEAT_RIGHTLEFT
                            wp->w_p_rl ? col < wp->w_width - wp->w_p_fdc :
  # endif
!                           col >= wp->w_p_fdc
! # ifdef FEAT_CMDWIN
!                                 + (cmdwin_type == 0 && wp == curwin ? 0 : 1)
! # endif
                            )
  #endif
                        && (flags & MOUSE_MAY_STOP_VIS))))
--- 1728,1734 ----
  # ifdef FEAT_RIGHTLEFT
                            wp->w_p_rl ? col < wp->w_width - wp->w_p_fdc :
  # endif
!                           col >= wp->w_p_fdc + (cmdwin_type == 0 && wp == 
curwin ? 0 : 1)
                            )
  #endif
                        && (flags & MOUSE_MAY_STOP_VIS))))
***************
*** 1743,1749 ****
            end_visual_mode_keep_button();
            redraw_curbuf_later(UPD_INVERTED);  // delete the inversion
        }
- #ifdef FEAT_CMDWIN
        if (cmdwin_type != 0 && wp != curwin)
        {
            // A click outside the command-line window: Use modeless
--- 1736,1741 ----
***************
*** 1759,1765 ****
            wp = curwin;
  # endif
        }
- #endif
  #if defined(FEAT_PROP_POPUP) && defined(FEAT_TERMINAL)
        if (popup_is_popup(curwin) && curbuf->b_term != NULL)
            // terminal in popup window: don't jump to another window
--- 1751,1756 ----
***************
*** 1848,1854 ****
            redraw_curbuf_later(UPD_INVERTED);  // delete the inversion
        }
  
! #if defined(FEAT_CMDWIN) && defined(FEAT_CLIPBOARD)
        // Continue a modeless selection in another window.
        if (cmdwin_type != 0 && row < curwin->w_winrow)
            return IN_OTHER_WIN;
--- 1839,1845 ----
            redraw_curbuf_later(UPD_INVERTED);  // delete the inversion
        }
  
! #if defined(FEAT_CLIPBOARD)
        // Continue a modeless selection in another window.
        if (cmdwin_type != 0 && row < curwin->w_winrow)
            return IN_OTHER_WIN;
***************
*** 1986,1995 ****
  # ifdef FEAT_RIGHTLEFT
            curwin->w_p_rl ? col < curwin->w_width - curwin->w_p_fdc :
  # endif
!           col >= curwin->w_p_fdc
! #  ifdef FEAT_CMDWIN
!                               + (cmdwin_type == 0 ? 0 : 1)
! #  endif
         )
        mouse_char = ' ';
  #endif
--- 1977,1983 ----
  # ifdef FEAT_RIGHTLEFT
            curwin->w_p_rl ? col < curwin->w_width - curwin->w_p_fdc :
  # endif
!           col >= curwin->w_p_fdc + (cmdwin_type == 0 ? 0 : 1)
         )
        mouse_char = ' ';
  #endif
*** ../vim-9.0.0656/src/move.c  2022-10-03 20:00:49.396319098 +0100
--- src/move.c  2022-10-04 15:49:21.176888264 +0100
***************
*** 968,976 ****
  win_col_off(win_T *wp)
  {
      return (((wp->w_p_nu || wp->w_p_rnu) ? number_width(wp) + 1 : 0)
- #ifdef FEAT_CMDWIN
            + (cmdwin_type == 0 || wp != curwin ? 0 : 1)
- #endif
  #ifdef FEAT_FOLDING
            + wp->w_p_fdc
  #endif
--- 968,974 ----
*** ../vim-9.0.0656/src/normal.c        2022-10-02 22:32:05.052990430 +0100
--- src/normal.c        2022-10-04 15:56:40.510180220 +0100
***************
*** 4028,4039 ****
  #endif
      else
      {
- #ifdef FEAT_CMDWIN
        // In the cmdline window a <CR> executes the command.
        if (cmdwin_type != 0 && cap->cmdchar == CAR)
            cmdwin_result = CAR;
        else
- #endif
  #ifdef FEAT_JOB_CHANNEL
        // In a prompt buffer a <CR> in the last line invokes the callback.
        if (bt_prompt(curbuf) && cap->cmdchar == CAR
--- 4028,4037 ----
***************
*** 6754,6763 ****
        if (restart_edit != 0 && mode_displayed)
            clear_cmdline = TRUE;               // unshow mode later
        restart_edit = 0;
- #ifdef FEAT_CMDWIN
        if (cmdwin_type != 0)
            cmdwin_result = Ctrl_C;
- #endif
        if (VIsual_active)
        {
            end_visual_mode();          // stop Visual
--- 6752,6759 ----
***************
*** 6788,6799 ****
  
      if (cap->arg)             // TRUE for CTRL-C
      {
!       if (restart_edit == 0
! #ifdef FEAT_CMDWIN
!               && cmdwin_type == 0
! #endif
!               && !VIsual_active
!               && no_reason)
        {
            int out_redir = !stdout_isatty && !is_not_a_term_or_gui();
  
--- 6784,6791 ----
  
      if (cap->arg)             // TRUE for CTRL-C
      {
!       if (restart_edit == 0 && cmdwin_type == 0
!                                               && !VIsual_active && no_reason)
        {
            int out_redir = !stdout_isatty && !is_not_a_term_or_gui();
  
***************
*** 6828,6843 ****
        // set again below when halfway a mapping.
        if (!p_im)
            restart_edit = 0;
- #ifdef FEAT_CMDWIN
        if (cmdwin_type != 0)
        {
            cmdwin_result = K_IGNORE;
            got_int = FALSE;    // don't stop executing autocommands et al.
            return;
        }
- #endif
      }
- #ifdef FEAT_CMDWIN
      else if (cmdwin_type != 0 && ex_normal_busy && typebuf_was_empty)
      {
        // When :normal runs out of characters while in the command line window
--- 6820,6832 ----
***************
*** 6846,6852 ****
        cmdwin_result = K_IGNORE;
        return;
      }
- #endif
  
      if (VIsual_active)
      {
--- 6835,6840 ----
***************
*** 7178,7184 ****
      }
      else if (!checkclearop(cap->oap))
      {
- #ifdef FEAT_CMDWIN
        if (cap->nchar == ':' || cap->nchar == '/' || cap->nchar == '?')
        {
            if (cmdwin_type != 0)
--- 7166,7171 ----
***************
*** 7190,7196 ****
            stuffcharReadbuff(K_CMDWIN);
        }
        else
- #endif
            // (stop) recording into a named register, unless executing a
            // register
            if (reg_executing == 0 && do_record(cap->nchar) == FAIL)
--- 7177,7182 ----
*** ../vim-9.0.0656/src/option.c        2022-10-03 11:22:59.217008645 +0100
--- src/option.c        2022-10-04 15:49:21.180888251 +0100
***************
*** 2404,2413 ****
      (void)compile_cap_prog(curwin->w_s);
      (void)did_set_spell_option(TRUE);
  #endif
- #ifdef FEAT_CMDWIN
      // set cedit_key
      (void)check_cedit();
- #endif
  #ifdef FEAT_LINEBREAK
      // initialize the table for 'breakat'.
      fill_breakat_flags();
--- 2404,2411 ----
***************
*** 3804,3816 ****
        errmsg = e_argument_must_be_positive;
        p_siso = 0;
      }
- #ifdef FEAT_CMDWIN
      if (p_cwh < 1)
      {
        errmsg = e_argument_must_be_positive;
        p_cwh = 1;
      }
- #endif
      if (p_ut < 0)
      {
        errmsg = e_argument_must_be_positive;
--- 3802,3812 ----
*** ../vim-9.0.0656/src/option.h        2022-10-03 15:27:30.062072077 +0100
--- src/option.h        2022-10-04 15:49:21.180888251 +0100
***************
*** 486,495 ****
  #endif
  EXTERN int    p_cdh;          // 'cdhome'
  EXTERN char_u *p_cino;        // 'cinoptions'
- #ifdef FEAT_CMDWIN
  EXTERN char_u *p_cedit;       // 'cedit'
  EXTERN long   p_cwh;          // 'cmdwinheight'
- #endif
  #ifdef FEAT_CLIPBOARD
  EXTERN char_u *p_cb;          // 'clipboard'
  #endif
--- 486,493 ----
*** ../vim-9.0.0656/src/optiondefs.h    2022-10-04 14:34:42.112964811 +0100
--- src/optiondefs.h    2022-10-04 15:49:21.180888251 +0100
***************
*** 544,556 ****
                            {(char_u *)",,", (char_u *)0L}
                            SCTX_INIT},
      {"cedit",     NULL,   P_STRING,
- #ifdef FEAT_CMDWIN
                            (char_u *)&p_cedit, PV_NONE,
                            {(char_u *)"", (char_u *)CTRL_F_STR}
- #else
-                           (char_u *)NULL, PV_NONE,
-                           {(char_u *)0L, (char_u *)0L}
- #endif
                            SCTX_INIT},
      {"charconvert",  "ccv", P_STRING|P_VI_DEF|P_SECURE,
  #if defined(FEAT_EVAL)
--- 544,551 ----
***************
*** 597,607 ****
                            (char_u *)&p_ch, PV_NONE,
                            {(char_u *)1L, (char_u *)0L} SCTX_INIT},
      {"cmdwinheight", "cwh", P_NUM|P_VI_DEF,
- #ifdef FEAT_CMDWIN
                            (char_u *)&p_cwh, PV_NONE,
- #else
-                           (char_u *)NULL, PV_NONE,
- #endif
                            {(char_u *)7L, (char_u *)0L} SCTX_INIT},
      {"colorcolumn", "cc",   P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN,
  #ifdef FEAT_SYN_HL
--- 592,598 ----
*** ../vim-9.0.0656/src/optionstr.c     2022-10-03 15:27:30.066072111 +0100
--- src/optionstr.c     2022-10-04 15:49:21.180888251 +0100
***************
*** 1326,1338 ****
        errmsg = set_chars_option(curwin, varp, TRUE);
      }
  
- #ifdef FEAT_CMDWIN
      // 'cedit'
      else if (varp == &p_cedit)
      {
        errmsg = check_cedit();
      }
- #endif
  
      // 'verbosefile'
      else if (varp == &p_vfile)
--- 1326,1336 ----
*** ../vim-9.0.0656/src/terminal.c      2022-09-01 12:22:19.747659165 +0100
--- src/terminal.c      2022-10-04 15:49:21.180888251 +0100
***************
*** 445,457 ****
  
      if (check_restricted() || check_secure())
        return NULL;
- #ifdef FEAT_CMDWIN
      if (cmdwin_type != 0)
      {
        emsg(_(e_cannot_open_terminal_from_command_line_window));
        return NULL;
      }
- #endif
  
      if ((opt->jo_set & (JO_IN_IO + JO_OUT_IO + JO_ERR_IO))
                                         == (JO_IN_IO + JO_OUT_IO + JO_ERR_IO)
--- 445,455 ----
*** ../vim-9.0.0656/src/textformat.c    2022-10-01 19:43:48.610494062 +0100
--- src/textformat.c    2022-10-04 15:49:21.180888251 +0100
***************
*** 794,803 ****
        // The width is the window width minus 'wrapmargin' minus all the
        // things that add to the margin.
        textwidth = curwin->w_width - curbuf->b_p_wm;
- #ifdef FEAT_CMDWIN
        if (cmdwin_type != 0)
            textwidth -= 1;
- #endif
  #ifdef FEAT_FOLDING
        textwidth -= curwin->w_p_fdc;
  #endif
--- 794,801 ----
*** ../vim-9.0.0656/src/window.c        2022-10-03 15:27:30.066072111 +0100
--- src/window.c        2022-10-04 15:49:21.180888251 +0100
***************
*** 119,130 ****
      win_T *
  prevwin_curwin(void)
  {
!     return
! #ifdef FEAT_CMDWIN
!       // In cmdwin, the alternative buffer should be used.
!       is_in_cmdwin() && prevwin != NULL ? prevwin :
! #endif
!       curwin;
  }
  
  /*
--- 119,126 ----
      win_T *
  prevwin_curwin(void)
  {
!     // In cmdwin, the alternative buffer should be used.
!     return is_in_cmdwin() && prevwin != NULL ? prevwin : curwin;
  }
  
  /*
***************
*** 149,156 ****
      if (ERROR_IF_ANY_POPUP_WINDOW)
        return;
  
! #ifdef FEAT_CMDWIN
! # define CHECK_CMDWIN \
      do { \
        if (cmdwin_type != 0) \
        { \
--- 145,151 ----
      if (ERROR_IF_ANY_POPUP_WINDOW)
        return;
  
! #define CHECK_CMDWIN \
      do { \
        if (cmdwin_type != 0) \
        { \
***************
*** 158,166 ****
            return; \
        } \
      } while (0)
- #else
- # define CHECK_CMDWIN do { /**/ } while (0)
- #endif
  
      Prenum1 = Prenum == 0 ? 1 : Prenum;
  
--- 153,158 ----
***************
*** 2963,2972 ****
  {
      int               dummy;
  
- #ifdef FEAT_CMDWIN
      // avoid an error for switching tabpage with the cmdline window open
      cmdwin_type = 0;
! #endif
      while (first_tabpage->tp_next != NULL)
        tabpage_close(TRUE);
  
--- 2955,2963 ----
  {
      int               dummy;
  
      // avoid an error for switching tabpage with the cmdline window open
      cmdwin_type = 0;
! 
      while (first_tabpage->tp_next != NULL)
        tabpage_close(TRUE);
  
***************
*** 4019,4031 ****
      tabpage_T *newtp;
      int               n;
  
- #ifdef FEAT_CMDWIN
      if (cmdwin_type != 0)
      {
        emsg(_(e_invalid_in_cmdline_window));
        return FAIL;
      }
- #endif
  
      newtp = alloc_tabpage();
      if (newtp == NULL)
--- 4010,4020 ----
***************
*** 5513,5519 ****
  #endif
  }
  
- #if defined(FEAT_CMDWIN) || defined(PROTO)
  /*
   * Save the size of all windows in "gap".
   */
--- 5502,5507 ----
***************
*** 5567,5573 ****
        (void)win_comp_pos();
      }
  }
- #endif // FEAT_CMDWIN
  
  /*
   * Update the position for all windows, using the width and height of the
--- 5555,5560 ----
***************
*** 6419,6428 ****
  
      if (wp->w_buffer->b_ml.ml_line_count < wp->w_height)
        return;
- #ifdef FEAT_CMDWIN
      if (skip_win_fix_cursor)
        return;
! #endif
      // Determine valid cursor range.
      so = MIN(wp->w_height / 2, so);
      wp->w_cursor.lnum = wp->w_topline;
--- 6406,6414 ----
  
      if (wp->w_buffer->b_ml.ml_line_count < wp->w_height)
        return;
      if (skip_win_fix_cursor)
        return;
! 
      // Determine valid cursor range.
      so = MIN(wp->w_height / 2, so);
      wp->w_cursor.lnum = wp->w_topline;
*** ../vim-9.0.0656/src/version.c       2022-10-04 14:34:42.116964799 +0100
--- src/version.c       2022-10-04 15:47:08.409263335 +0100
***************
*** 701,702 ****
--- 701,704 ----
  {   /* Add new patch number below this line */
+ /**/
+     657,
  /**/

-- 
Edison's greatest achievement came in 1879, when he invented the
electric company.  Edison's design was a brilliant adaptation of the
simple electrical circuit: the electric company sends electricity
through a wire to a customer, then immediately gets the electricity
back through another wire

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221004153032.626201C09A3%40moolenaar.net.

Raspunde prin e-mail lui