]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1550: defaults: 'showcmd' is not enabled in non-compatible mode on Unix v9.1.1550
authorChristian Brabandt <cb@256bit.org>
Tue, 15 Jul 2025 19:26:25 +0000 (21:26 +0200)
committerChristian Brabandt <cb@256bit.org>
Tue, 15 Jul 2025 19:26:25 +0000 (21:26 +0200)
Problem:  defaults: 'showcmd' is not enabled in non-compatible mode on
          Unix
Solution: Always enable 'showcmd' in non-compatible mode, drop it from
          defaults.vim.

'showcmd' was already always enabled in Vim compatible mode except for
UNIX environments. So let's just enable it always, there is no good
reason why UNIX platforms should be handled differently than other
platforms, especially since `defaults.vim` did enable this option
anyhow.

closes: #17739

Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/defaults.vim
runtime/doc/options.txt
runtime/doc/version9.txt
src/optiondefs.h
src/po/vim.pot
src/testdir/dumps/Test_long_file_name_2.dump [new file with mode: 0644]
src/testdir/test_display.vim
src/testdir/test_options.vim
src/version.c

index af6d583712ab6cdf885a25b05615692e7fca4e10..d51eeee0308b775a0eec308d4b82a92ff369b3c0 100644 (file)
@@ -1,7 +1,7 @@
 " The default vimrc file.
 "
 " Maintainer:  The Vim Project <https://github.com/vim/vim>
-" Last Change: 2025 Apr 10
+" Last Change: 2025 Jul 13
 " Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 "
 " This is loaded if no vimrc file was found.
@@ -34,7 +34,6 @@ silent! while 0
 silent! endwhile
 
 set ruler              " show the cursor position all the time
-set showcmd            " display incomplete commands
 
 set ttimeout           " time out for key codes
 set ttimeoutlen=100    " wait up to 100ms after Esc for special key
index 5c2904853363e6acb60631c59f6891037b3f7e28..44079bbbd408018a47157ddf43f873e10708e215 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 9.1.  Last change: 2025 Jul 10
+*options.txt*  For Vim version 9.1.  Last change: 2025 Jul 13
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -7727,8 +7727,7 @@ A jump table for the options with a short description can be found at |Q_op|.
                :setlocal showbreak=NONE
 <
                                     *'showcmd'* *'sc'* *'noshowcmd'* *'nosc'*
-'showcmd' 'sc'         boolean (Vim default: on, off for Unix,
-                                      Vi default: off, set in |defaults.vim|)
+'showcmd' 'sc'         boolean (Vim default: on, Vi default: off)
                        global
        Show (partial) command in the last line of the screen.  Set this
        option off if your terminal is slow.
index 9b7aeefcb9b282d5521e2c101ff7820eaf30b1ec..961790bf25824fbe1ac7d3c0398fa040ef551a3d 100644 (file)
@@ -1,4 +1,4 @@
-*version9.txt*  For Vim version 9.1.  Last change: 2025 Jul 14
+*version9.txt*  For Vim version 9.1.  Last change: 2025 Jul 15
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -41648,6 +41648,9 @@ Default values: ~
 - the default value of the 'keyprotocol' option has been updated and support
   for the ghostty terminal emulator (using kitty protocol) has been added
 - Improved visual highlighting |hl-Visual|
+- the default value for 'showcmd' is always enabled when using non-compatible
+  mode (previously, it was off on UNIX systems) and consequently removed from
+  |defaults.vim|
 
 Completion: ~
 - allow to complete directories from 'cdpath' for |:cd| and similar commands,
index a2d4495411070145ef2ac15238cb1c7ba06a143f..aae285ca75aebffbd79d9171e206acf9fd605447 100644 (file)
@@ -2365,13 +2365,7 @@ static struct vimoption options[] =
                            {(char_u *)"", (char_u *)0L} SCTX_INIT},
     {"showcmd",            "sc",   P_BOOL|P_VIM,
                            (char_u *)&p_sc, PV_NONE, NULL, NULL,
-                           {(char_u *)FALSE,
-#ifdef UNIX
-                               (char_u *)FALSE
-#else
-                               (char_u *)TRUE
-#endif
-                               } SCTX_INIT},
+                           {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
     {"showcmdloc",  "sloc", P_STRING|P_RSTAT,
                            (char_u *)&p_sloc, PV_NONE, did_set_showcmdloc, expand_set_showcmdloc,
                            {(char_u *)"last", (char_u *)"last"} SCTX_INIT},
index 70acc24c8cea61021e18b57b9a577714e1ac9fd5..6bbe365910375ee2eabcdf5095ecfc28b6cf5c86 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-07-15 21:16+0200\n"
+"POT-Creation-Date: 2025-07-15 21:26+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -4257,327 +4257,327 @@ msgstr ""
 msgid "%s (%s, compiled %s)"
 msgstr ""
 
-#: ../version.c:4030
+#: ../version.c:4034
 msgid ""
 "\n"
 "MS-Windows ARM64 GUI/console version"
 msgstr ""
 
-#: ../version.c:4032
+#: ../version.c:4036
 msgid ""
 "\n"
 "MS-Windows 64-bit GUI/console version"
 msgstr ""
 
-#: ../version.c:4035
+#: ../version.c:4039
 msgid ""
 "\n"
 "MS-Windows 32-bit GUI/console version"
 msgstr ""
 
-#: ../version.c:4040
+#: ../version.c:4044
 msgid ""
 "\n"
 "MS-Windows ARM64 GUI version"
 msgstr ""
 
-#: ../version.c:4042
+#: ../version.c:4046
 msgid ""
 "\n"
 "MS-Windows 64-bit GUI version"
 msgstr ""
 
-#: ../version.c:4045
+#: ../version.c:4049
 msgid ""
 "\n"
 "MS-Windows 32-bit GUI version"
 msgstr ""
 
-#: ../version.c:4049
+#: ../version.c:4053
 msgid " with OLE support"
 msgstr ""
 
-#: ../version.c:4054
+#: ../version.c:4058
 msgid ""
 "\n"
 "MS-Windows ARM64 console version"
 msgstr ""
 
-#: ../version.c:4056
+#: ../version.c:4060
 msgid ""
 "\n"
 "MS-Windows 64-bit console version"
 msgstr ""
 
-#: ../version.c:4059
+#: ../version.c:4063
 msgid ""
 "\n"
 "MS-Windows 32-bit console version"
 msgstr ""
 
-#: ../version.c:4065
+#: ../version.c:4069
 msgid ""
 "\n"
 "macOS version"
 msgstr ""
 
-#: ../version.c:4067
+#: ../version.c:4071
 msgid ""
 "\n"
 "macOS version w/o darwin feat."
 msgstr ""
 
-#: ../version.c:4077
+#: ../version.c:4081
 msgid ""
 "\n"
 "OpenVMS version"
 msgstr ""
 
-#: ../version.c:4092
+#: ../version.c:4096
 msgid ""
 "\n"
 "Included patches: "
 msgstr ""
 
-#: ../version.c:4117
+#: ../version.c:4121
 msgid ""
 "\n"
 "Extra patches: "
 msgstr ""
 
-#: ../version.c:4129 ../version.c:4440
+#: ../version.c:4133 ../version.c:4444
 msgid "Modified by "
 msgstr ""
 
-#: ../version.c:4136
+#: ../version.c:4140
 msgid ""
 "\n"
 "Compiled "
 msgstr ""
 
-#: ../version.c:4139
+#: ../version.c:4143
 msgid "by "
 msgstr ""
 
-#: ../version.c:4151
+#: ../version.c:4155
 msgid ""
 "\n"
 "Huge version "
 msgstr ""
 
-#: ../version.c:4153
+#: ../version.c:4157
 msgid ""
 "\n"
 "Normal version "
 msgstr ""
 
-#: ../version.c:4155
+#: ../version.c:4159
 msgid ""
 "\n"
 "Tiny version "
 msgstr ""
 
-#: ../version.c:4158
+#: ../version.c:4162
 msgid "without GUI."
 msgstr ""
 
-#: ../version.c:4161
+#: ../version.c:4165
 msgid "with GTK3 GUI."
 msgstr ""
 
-#: ../version.c:4163
+#: ../version.c:4167
 msgid "with GTK2-GNOME GUI."
 msgstr ""
 
-#: ../version.c:4165
+#: ../version.c:4169
 msgid "with GTK2 GUI."
 msgstr ""
 
-#: ../version.c:4168
+#: ../version.c:4172
 msgid "with X11-Motif GUI."
 msgstr ""
 
-#: ../version.c:4170
+#: ../version.c:4174
 msgid "with Haiku GUI."
 msgstr ""
 
-#: ../version.c:4172
+#: ../version.c:4176
 msgid "with Photon GUI."
 msgstr ""
 
-#: ../version.c:4174
+#: ../version.c:4178
 msgid "with GUI."
 msgstr ""
 
-#: ../version.c:4176
+#: ../version.c:4180
 msgid "  Features included (+) or not (-):\n"
 msgstr ""
 
-#: ../version.c:4183
+#: ../version.c:4187
 msgid "   system vimrc file: \""
 msgstr ""
 
-#: ../version.c:4188
+#: ../version.c:4192
 msgid "     user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4193
+#: ../version.c:4197
 msgid " 2nd user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4198 ../version.c:4205 ../version.c:4209
+#: ../version.c:4202 ../version.c:4209 ../version.c:4213
 msgid " 3rd user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4201
+#: ../version.c:4205
 msgid " 4th user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4214
+#: ../version.c:4218
 msgid "      user exrc file: \""
 msgstr ""
 
-#: ../version.c:4219
+#: ../version.c:4223
 msgid "  2nd user exrc file: \""
 msgstr ""
 
-#: ../version.c:4225
+#: ../version.c:4229
 msgid "  system gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4229
+#: ../version.c:4233
 msgid "    user gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4233
+#: ../version.c:4237
 msgid "2nd user gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4238
+#: ../version.c:4242
 msgid "3rd user gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4243
+#: ../version.c:4247
 msgid "       defaults file: \""
 msgstr ""
 
-#: ../version.c:4248
+#: ../version.c:4252
 msgid "    system menu file: \""
 msgstr ""
 
-#: ../version.c:4256
+#: ../version.c:4260
 msgid "  fall-back for $VIM: \""
 msgstr ""
 
-#: ../version.c:4262
+#: ../version.c:4266
 msgid " f-b for $VIMRUNTIME: \""
 msgstr ""
 
-#: ../version.c:4266
+#: ../version.c:4270
 msgid "Compilation: "
 msgstr ""
 
-#: ../version.c:4272
+#: ../version.c:4276
 msgid "Compiler: "
 msgstr ""
 
-#: ../version.c:4277
+#: ../version.c:4281
 msgid "Linking: "
 msgstr ""
 
-#: ../version.c:4282
+#: ../version.c:4286
 msgid "  DEBUG BUILD"
 msgstr ""
 
-#: ../version.c:4318
+#: ../version.c:4322
 msgid "VIM - Vi IMproved"
 msgstr ""
 
-#: ../version.c:4320
+#: ../version.c:4324
 msgid "version "
 msgstr ""
 
-#: ../version.c:4321
+#: ../version.c:4325
 msgid "by Bram Moolenaar et al."
 msgstr ""
 
-#: ../version.c:4325
+#: ../version.c:4329
 msgid "Vim is open source and freely distributable"
 msgstr ""
 
-#: ../version.c:4327
+#: ../version.c:4331
 msgid "Help poor children in Uganda!"
 msgstr ""
 
-#: ../version.c:4328
+#: ../version.c:4332
 msgid "type  :help iccf<Enter>       for information "
 msgstr ""
 
-#: ../version.c:4330
+#: ../version.c:4334
 msgid "type  :q<Enter>               to exit         "
 msgstr ""
 
-#: ../version.c:4331
+#: ../version.c:4335
 msgid "type  :help<Enter>  or  <F1>  for on-line help"
 msgstr ""
 
-#: ../version.c:4332
+#: ../version.c:4336
 msgid "type  :help version9<Enter>   for version info"
 msgstr ""
 
-#: ../version.c:4335
+#: ../version.c:4339
 msgid "Running in Vi compatible mode"
 msgstr ""
 
-#: ../version.c:4336
+#: ../version.c:4340
 msgid "type  :set nocp<Enter>        for Vim defaults"
 msgstr ""
 
-#: ../version.c:4337
+#: ../version.c:4341
 msgid "type  :help cp-default<Enter> for info on this"
 msgstr ""
 
-#: ../version.c:4352
+#: ../version.c:4356
 msgid "menu  Help->Orphans           for information    "
 msgstr ""
 
-#: ../version.c:4354
+#: ../version.c:4358
 msgid "Running modeless, typed text is inserted"
 msgstr ""
 
-#: ../version.c:4355
+#: ../version.c:4359
 msgid "menu  Edit->Global Settings->Toggle Insert Mode  "
 msgstr ""
 
-#: ../version.c:4356
+#: ../version.c:4360
 msgid "                              for two modes      "
 msgstr ""
 
-#: ../version.c:4360
+#: ../version.c:4364
 msgid "menu  Edit->Global Settings->Toggle Vi Compatible"
 msgstr ""
 
-#: ../version.c:4361
+#: ../version.c:4365
 msgid "                              for Vim defaults   "
 msgstr ""
 
-#: ../version.c:4402
+#: ../version.c:4406
 msgid "Sponsor Vim development!"
 msgstr ""
 
-#: ../version.c:4403
+#: ../version.c:4407
 msgid "Become a registered Vim user!"
 msgstr ""
 
-#: ../version.c:4406
+#: ../version.c:4410
 msgid "type  :help sponsor<Enter>    for information "
 msgstr ""
 
-#: ../version.c:4407
+#: ../version.c:4411
 msgid "type  :help register<Enter>   for information "
 msgstr ""
 
-#: ../version.c:4409
+#: ../version.c:4413
 msgid "menu  Help->Sponsor/Register  for information    "
 msgstr ""
 
@@ -13566,6 +13566,6 @@ msgstr ""
 msgid "options for using tabpanel"
 msgstr ""
 
-#: ../../runtime/defaults.vim:129
+#: ../../runtime/defaults.vim:128
 msgid "You discovered the command-line window! You can close it with \":q\"."
 msgstr ""
diff --git a/src/testdir/dumps/Test_long_file_name_2.dump b/src/testdir/dumps/Test_long_file_name_2.dump
new file mode 100644 (file)
index 0000000..40ec5ce
--- /dev/null
@@ -0,0 +1,8 @@
+> +0&#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|<+0#0000000&|x@53|"| |0|L|,| |0|B| @11
index 5f597f133b3021f2016f7fe3e5186e9f30ef1b55..61a7e3cf7871c06087dac8c5b3def3c245640559 100644 (file)
@@ -184,10 +184,13 @@ func Test_edit_long_file_name()
 
   let longName = 'x'->repeat(min([&columns, 255]))
   call writefile([], longName, 'D')
-  let buf = RunVimInTerminal('-N -u NONE ' .. longName, #{rows: 8})
+  let buf = RunVimInTerminal('-N -u NONE --cmd ":set noshowcmd" ' .. longName, #{rows: 8})
 
   call VerifyScreenDump(buf, 'Test_long_file_name_1', {})
 
+  call term_sendkeys(buf, ":set showcmd\<cr>:e!\<cr>")
+  call VerifyScreenDump(buf, 'Test_long_file_name_2', {})
+
   " clean up
   call StopVimInTerminal(buf)
 endfunc
index 084646699d0195602e7c1ed4ffb49da661e0da1d..af097a29553affd4900b9de010b7f2ddbb6cf3ce 100644 (file)
@@ -2907,4 +2907,15 @@ func Test_default_keyprotocol()
   call assert_equal('kitty:kitty,foot:kitty,ghostty:kitty,wezterm:kitty,xterm:mok2', &keyprotocol)
 endfunc
 
+func Test_showcmd()
+  " in no-cp mode, 'showcmd' is enabled
+  let _cp=&cp
+  call assert_equal(1, &showcmd)
+  set cp
+  call assert_equal(0, &showcmd)
+  set nocp
+  call assert_equal(1, &showcmd)
+  let &cp = _cp
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab
index 347875822d2f9dfc5995ab50ddf4abdeb2ff8e46..9fd90fa34a45d8b5c49155f258c95f2e8f0973f8 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1550,
 /**/
     1549,
 /**/