patch 9.1.1550: defaults: 'showcmd' is not enabled in non-compatible mode on Unix

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>
This commit is contained in:
Christian Brabandt
2025-07-15 21:26:25 +02:00
parent d128889b30
commit 3f9d2378bd
9 changed files with 116 additions and 97 deletions

View File

@ -1,7 +1,7 @@
" The default vimrc file. " The default vimrc file.
" "
" Maintainer: The Vim Project <https://github.com/vim/vim> " 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> " Former Maintainer: Bram Moolenaar <Bram@vim.org>
" "
" This is loaded if no vimrc file was found. " This is loaded if no vimrc file was found.
@ -34,7 +34,6 @@ silent! while 0
silent! endwhile silent! endwhile
set ruler " show the cursor position all the time set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set ttimeout " time out for key codes set ttimeout " time out for key codes
set ttimeoutlen=100 " wait up to 100ms after Esc for special key set ttimeoutlen=100 " wait up to 100ms after Esc for special key

View 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 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 :setlocal showbreak=NONE
< <
*'showcmd'* *'sc'* *'noshowcmd'* *'nosc'* *'showcmd'* *'sc'* *'noshowcmd'* *'nosc'*
'showcmd' 'sc' boolean (Vim default: on, off for Unix, 'showcmd' 'sc' boolean (Vim default: on, Vi default: off)
Vi default: off, set in |defaults.vim|)
global global
Show (partial) command in the last line of the screen. Set this Show (partial) command in the last line of the screen. Set this
option off if your terminal is slow. option off if your terminal is slow.

View 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 VIM REFERENCE MANUAL by Bram Moolenaar
@ -41648,6 +41648,9 @@ Default values: ~
- the default value of the 'keyprotocol' option has been updated and support - the default value of the 'keyprotocol' option has been updated and support
for the ghostty terminal emulator (using kitty protocol) has been added for the ghostty terminal emulator (using kitty protocol) has been added
- Improved visual highlighting |hl-Visual| - 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: ~ Completion: ~
- allow to complete directories from 'cdpath' for |:cd| and similar commands, - allow to complete directories from 'cdpath' for |:cd| and similar commands,

View File

@ -2365,13 +2365,7 @@ static struct vimoption options[] =
{(char_u *)"", (char_u *)0L} SCTX_INIT}, {(char_u *)"", (char_u *)0L} SCTX_INIT},
{"showcmd", "sc", P_BOOL|P_VIM, {"showcmd", "sc", P_BOOL|P_VIM,
(char_u *)&p_sc, PV_NONE, NULL, NULL, (char_u *)&p_sc, PV_NONE, NULL, NULL,
{(char_u *)FALSE, {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
#ifdef UNIX
(char_u *)FALSE
#else
(char_u *)TRUE
#endif
} SCTX_INIT},
{"showcmdloc", "sloc", P_STRING|P_RSTAT, {"showcmdloc", "sloc", P_STRING|P_RSTAT,
(char_u *)&p_sloc, PV_NONE, did_set_showcmdloc, expand_set_showcmdloc, (char_u *)&p_sloc, PV_NONE, did_set_showcmdloc, expand_set_showcmdloc,
{(char_u *)"last", (char_u *)"last"} SCTX_INIT}, {(char_u *)"last", (char_u *)"last"} SCTX_INIT},

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -4257,327 +4257,327 @@ msgstr ""
msgid "%s (%s, compiled %s)" msgid "%s (%s, compiled %s)"
msgstr "" msgstr ""
#: ../version.c:4030 #: ../version.c:4034
msgid "" msgid ""
"\n" "\n"
"MS-Windows ARM64 GUI/console version" "MS-Windows ARM64 GUI/console version"
msgstr "" msgstr ""
#: ../version.c:4032 #: ../version.c:4036
msgid "" msgid ""
"\n" "\n"
"MS-Windows 64-bit GUI/console version" "MS-Windows 64-bit GUI/console version"
msgstr "" msgstr ""
#: ../version.c:4035 #: ../version.c:4039
msgid "" msgid ""
"\n" "\n"
"MS-Windows 32-bit GUI/console version" "MS-Windows 32-bit GUI/console version"
msgstr "" msgstr ""
#: ../version.c:4040 #: ../version.c:4044
msgid "" msgid ""
"\n" "\n"
"MS-Windows ARM64 GUI version" "MS-Windows ARM64 GUI version"
msgstr "" msgstr ""
#: ../version.c:4042 #: ../version.c:4046
msgid "" msgid ""
"\n" "\n"
"MS-Windows 64-bit GUI version" "MS-Windows 64-bit GUI version"
msgstr "" msgstr ""
#: ../version.c:4045 #: ../version.c:4049
msgid "" msgid ""
"\n" "\n"
"MS-Windows 32-bit GUI version" "MS-Windows 32-bit GUI version"
msgstr "" msgstr ""
#: ../version.c:4049 #: ../version.c:4053
msgid " with OLE support" msgid " with OLE support"
msgstr "" msgstr ""
#: ../version.c:4054 #: ../version.c:4058
msgid "" msgid ""
"\n" "\n"
"MS-Windows ARM64 console version" "MS-Windows ARM64 console version"
msgstr "" msgstr ""
#: ../version.c:4056 #: ../version.c:4060
msgid "" msgid ""
"\n" "\n"
"MS-Windows 64-bit console version" "MS-Windows 64-bit console version"
msgstr "" msgstr ""
#: ../version.c:4059 #: ../version.c:4063
msgid "" msgid ""
"\n" "\n"
"MS-Windows 32-bit console version" "MS-Windows 32-bit console version"
msgstr "" msgstr ""
#: ../version.c:4065 #: ../version.c:4069
msgid "" msgid ""
"\n" "\n"
"macOS version" "macOS version"
msgstr "" msgstr ""
#: ../version.c:4067 #: ../version.c:4071
msgid "" msgid ""
"\n" "\n"
"macOS version w/o darwin feat." "macOS version w/o darwin feat."
msgstr "" msgstr ""
#: ../version.c:4077 #: ../version.c:4081
msgid "" msgid ""
"\n" "\n"
"OpenVMS version" "OpenVMS version"
msgstr "" msgstr ""
#: ../version.c:4092 #: ../version.c:4096
msgid "" msgid ""
"\n" "\n"
"Included patches: " "Included patches: "
msgstr "" msgstr ""
#: ../version.c:4117 #: ../version.c:4121
msgid "" msgid ""
"\n" "\n"
"Extra patches: " "Extra patches: "
msgstr "" msgstr ""
#: ../version.c:4129 ../version.c:4440 #: ../version.c:4133 ../version.c:4444
msgid "Modified by " msgid "Modified by "
msgstr "" msgstr ""
#: ../version.c:4136 #: ../version.c:4140
msgid "" msgid ""
"\n" "\n"
"Compiled " "Compiled "
msgstr "" msgstr ""
#: ../version.c:4139 #: ../version.c:4143
msgid "by " msgid "by "
msgstr "" msgstr ""
#: ../version.c:4151
msgid ""
"\n"
"Huge version "
msgstr ""
#: ../version.c:4153
msgid ""
"\n"
"Normal version "
msgstr ""
#: ../version.c:4155 #: ../version.c:4155
msgid "" msgid ""
"\n" "\n"
"Huge version "
msgstr ""
#: ../version.c:4157
msgid ""
"\n"
"Normal version "
msgstr ""
#: ../version.c:4159
msgid ""
"\n"
"Tiny version " "Tiny version "
msgstr "" msgstr ""
#: ../version.c:4158 #: ../version.c:4162
msgid "without GUI." msgid "without GUI."
msgstr "" msgstr ""
#: ../version.c:4161 #: ../version.c:4165
msgid "with GTK3 GUI." msgid "with GTK3 GUI."
msgstr "" msgstr ""
#: ../version.c:4163 #: ../version.c:4167
msgid "with GTK2-GNOME GUI." msgid "with GTK2-GNOME GUI."
msgstr "" msgstr ""
#: ../version.c:4165 #: ../version.c:4169
msgid "with GTK2 GUI." msgid "with GTK2 GUI."
msgstr "" msgstr ""
#: ../version.c:4168 #: ../version.c:4172
msgid "with X11-Motif GUI." msgid "with X11-Motif GUI."
msgstr "" msgstr ""
#: ../version.c:4170 #: ../version.c:4174
msgid "with Haiku GUI." msgid "with Haiku GUI."
msgstr "" msgstr ""
#: ../version.c:4172 #: ../version.c:4176
msgid "with Photon GUI." msgid "with Photon GUI."
msgstr "" msgstr ""
#: ../version.c:4174 #: ../version.c:4178
msgid "with GUI." msgid "with GUI."
msgstr "" msgstr ""
#: ../version.c:4176 #: ../version.c:4180
msgid " Features included (+) or not (-):\n" msgid " Features included (+) or not (-):\n"
msgstr "" msgstr ""
#: ../version.c:4183 #: ../version.c:4187
msgid " system vimrc file: \"" msgid " system vimrc file: \""
msgstr "" msgstr ""
#: ../version.c:4188 #: ../version.c:4192
msgid " user vimrc file: \"" msgid " user vimrc file: \""
msgstr "" msgstr ""
#: ../version.c:4193 #: ../version.c:4197
msgid " 2nd user vimrc file: \"" msgid " 2nd user vimrc file: \""
msgstr "" msgstr ""
#: ../version.c:4198 ../version.c:4205 ../version.c:4209 #: ../version.c:4202 ../version.c:4209 ../version.c:4213
msgid " 3rd user vimrc file: \"" msgid " 3rd user vimrc file: \""
msgstr "" msgstr ""
#: ../version.c:4201 #: ../version.c:4205
msgid " 4th user vimrc file: \"" msgid " 4th user vimrc file: \""
msgstr "" msgstr ""
#: ../version.c:4214 #: ../version.c:4218
msgid " user exrc file: \"" msgid " user exrc file: \""
msgstr "" msgstr ""
#: ../version.c:4219 #: ../version.c:4223
msgid " 2nd user exrc file: \"" msgid " 2nd user exrc file: \""
msgstr "" msgstr ""
#: ../version.c:4225 #: ../version.c:4229
msgid " system gvimrc file: \"" msgid " system gvimrc file: \""
msgstr "" msgstr ""
#: ../version.c:4229 #: ../version.c:4233
msgid " user gvimrc file: \"" msgid " user gvimrc file: \""
msgstr "" msgstr ""
#: ../version.c:4233 #: ../version.c:4237
msgid "2nd user gvimrc file: \"" msgid "2nd user gvimrc file: \""
msgstr "" msgstr ""
#: ../version.c:4238 #: ../version.c:4242
msgid "3rd user gvimrc file: \"" msgid "3rd user gvimrc file: \""
msgstr "" msgstr ""
#: ../version.c:4243 #: ../version.c:4247
msgid " defaults file: \"" msgid " defaults file: \""
msgstr "" msgstr ""
#: ../version.c:4248 #: ../version.c:4252
msgid " system menu file: \"" msgid " system menu file: \""
msgstr "" msgstr ""
#: ../version.c:4256 #: ../version.c:4260
msgid " fall-back for $VIM: \"" msgid " fall-back for $VIM: \""
msgstr "" msgstr ""
#: ../version.c:4262 #: ../version.c:4266
msgid " f-b for $VIMRUNTIME: \"" msgid " f-b for $VIMRUNTIME: \""
msgstr "" msgstr ""
#: ../version.c:4266 #: ../version.c:4270
msgid "Compilation: " msgid "Compilation: "
msgstr "" msgstr ""
#: ../version.c:4272 #: ../version.c:4276
msgid "Compiler: " msgid "Compiler: "
msgstr "" msgstr ""
#: ../version.c:4277 #: ../version.c:4281
msgid "Linking: " msgid "Linking: "
msgstr "" msgstr ""
#: ../version.c:4282 #: ../version.c:4286
msgid " DEBUG BUILD" msgid " DEBUG BUILD"
msgstr "" msgstr ""
#: ../version.c:4318 #: ../version.c:4322
msgid "VIM - Vi IMproved" msgid "VIM - Vi IMproved"
msgstr "" msgstr ""
#: ../version.c:4320 #: ../version.c:4324
msgid "version " msgid "version "
msgstr "" msgstr ""
#: ../version.c:4321 #: ../version.c:4325
msgid "by Bram Moolenaar et al." msgid "by Bram Moolenaar et al."
msgstr "" msgstr ""
#: ../version.c:4325 #: ../version.c:4329
msgid "Vim is open source and freely distributable" msgid "Vim is open source and freely distributable"
msgstr "" msgstr ""
#: ../version.c:4327 #: ../version.c:4331
msgid "Help poor children in Uganda!" msgid "Help poor children in Uganda!"
msgstr "" msgstr ""
#: ../version.c:4328 #: ../version.c:4332
msgid "type :help iccf<Enter> for information " msgid "type :help iccf<Enter> for information "
msgstr "" msgstr ""
#: ../version.c:4330 #: ../version.c:4334
msgid "type :q<Enter> to exit " msgid "type :q<Enter> to exit "
msgstr "" msgstr ""
#: ../version.c:4331 #: ../version.c:4335
msgid "type :help<Enter> or <F1> for on-line help" msgid "type :help<Enter> or <F1> for on-line help"
msgstr "" msgstr ""
#: ../version.c:4332 #: ../version.c:4336
msgid "type :help version9<Enter> for version info" msgid "type :help version9<Enter> for version info"
msgstr "" msgstr ""
#: ../version.c:4335 #: ../version.c:4339
msgid "Running in Vi compatible mode" msgid "Running in Vi compatible mode"
msgstr "" msgstr ""
#: ../version.c:4336 #: ../version.c:4340
msgid "type :set nocp<Enter> for Vim defaults" msgid "type :set nocp<Enter> for Vim defaults"
msgstr "" msgstr ""
#: ../version.c:4337 #: ../version.c:4341
msgid "type :help cp-default<Enter> for info on this" msgid "type :help cp-default<Enter> for info on this"
msgstr "" msgstr ""
#: ../version.c:4352 #: ../version.c:4356
msgid "menu Help->Orphans for information " msgid "menu Help->Orphans for information "
msgstr "" msgstr ""
#: ../version.c:4354 #: ../version.c:4358
msgid "Running modeless, typed text is inserted" msgid "Running modeless, typed text is inserted"
msgstr "" msgstr ""
#: ../version.c:4355 #: ../version.c:4359
msgid "menu Edit->Global Settings->Toggle Insert Mode " msgid "menu Edit->Global Settings->Toggle Insert Mode "
msgstr "" msgstr ""
#: ../version.c:4356 #: ../version.c:4360
msgid " for two modes " msgid " for two modes "
msgstr "" msgstr ""
#: ../version.c:4360 #: ../version.c:4364
msgid "menu Edit->Global Settings->Toggle Vi Compatible" msgid "menu Edit->Global Settings->Toggle Vi Compatible"
msgstr "" msgstr ""
#: ../version.c:4361 #: ../version.c:4365
msgid " for Vim defaults " msgid " for Vim defaults "
msgstr "" msgstr ""
#: ../version.c:4402 #: ../version.c:4406
msgid "Sponsor Vim development!" msgid "Sponsor Vim development!"
msgstr "" msgstr ""
#: ../version.c:4403 #: ../version.c:4407
msgid "Become a registered Vim user!" msgid "Become a registered Vim user!"
msgstr "" msgstr ""
#: ../version.c:4406 #: ../version.c:4410
msgid "type :help sponsor<Enter> for information " msgid "type :help sponsor<Enter> for information "
msgstr "" msgstr ""
#: ../version.c:4407 #: ../version.c:4411
msgid "type :help register<Enter> for information " msgid "type :help register<Enter> for information "
msgstr "" msgstr ""
#: ../version.c:4409 #: ../version.c:4413
msgid "menu Help->Sponsor/Register for information " msgid "menu Help->Sponsor/Register for information "
msgstr "" msgstr ""
@ -13566,6 +13566,6 @@ msgstr ""
msgid "options for using tabpanel" msgid "options for using tabpanel"
msgstr "" msgstr ""
#: ../../runtime/defaults.vim:129 #: ../../runtime/defaults.vim:128
msgid "You discovered the command-line window! You can close it with \":q\"." msgid "You discovered the command-line window! You can close it with \":q\"."
msgstr "" msgstr ""

View File

@ -0,0 +1,8 @@
> +0&#ffffff0@74
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|<+0#0000000&|x@53|"| |0|L|,| |0|B| @11

View File

@ -184,10 +184,13 @@ func Test_edit_long_file_name()
let longName = 'x'->repeat(min([&columns, 255])) let longName = 'x'->repeat(min([&columns, 255]))
call writefile([], longName, 'D') 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 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 " clean up
call StopVimInTerminal(buf) call StopVimInTerminal(buf)
endfunc endfunc

View File

@ -2907,4 +2907,15 @@ func Test_default_keyprotocol()
call assert_equal('kitty:kitty,foot:kitty,ghostty:kitty,wezterm:kitty,xterm:mok2', &keyprotocol) call assert_equal('kitty:kitty,foot:kitty,ghostty:kitty,wezterm:kitty,xterm:mok2', &keyprotocol)
endfunc 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 " vim: shiftwidth=2 sts=2 expandtab

View File

@ -719,6 +719,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1550,
/**/ /**/
1549, 1549,
/**/ /**/