patch 9.1.1550: defaults: 'showcmd' is not enabled in non-compatible mode on Unix
Commit: https://github.com/vim/vim/commit/3f9d2378bd70748fc59e02a402422269bd096492 Author: Christian Brabandt <c...@256bit.org> Date: Tue Jul 15 21:26:25 2025 +0200 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 <c...@256bit.org> diff --git a/runtime/defaults.vim b/runtime/defaults.vim index af6d58371..d51eeee03 100644 --- a/runtime/defaults.vim +++ b/runtime/defaults.vim @@ -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 <b...@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 diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 5c2904853..44079bbbd 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -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. diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 9b7aeefcb..961790bf2 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -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, diff --git a/src/optiondefs.h b/src/optiondefs.h index a2d449541..aae285ca7 100644 --- a/src/optiondefs.h +++ b/src/optiondefs.h @@ -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}, diff --git a/src/po/vim.pot b/src/po/vim.pot index 70acc24c8..6bbe36591 100644 --- a/src/po/vim.pot +++ b/src/po/vim.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION " "Report-Msgid-Bugs-To: " -"POT-Creation-Date: 2025-07-15 21:16+0200 " +"POT-Creation-Date: 2025-07-15 21:26+0200 " "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE " "Last-Translator: FULL NAME <EMAIL@ADDRESS> " "Language-Team: LANGUAGE <l...@li.org> " @@ -4257,327 +4257,327 @@ msgstr "" msgid "%s (%s, compiled %s)" msgstr "" -#: ../version.c:4030 +#: ../version.c:4034 msgid "" " " "MS-Windows ARM64 GUI/console version" msgstr "" -#: ../version.c:4032 +#: ../version.c:4036 msgid "" " " "MS-Windows 64-bit GUI/console version" msgstr "" -#: ../version.c:4035 +#: ../version.c:4039 msgid "" " " "MS-Windows 32-bit GUI/console version" msgstr "" -#: ../version.c:4040 +#: ../version.c:4044 msgid "" " " "MS-Windows ARM64 GUI version" msgstr "" -#: ../version.c:4042 +#: ../version.c:4046 msgid "" " " "MS-Windows 64-bit GUI version" msgstr "" -#: ../version.c:4045 +#: ../version.c:4049 msgid "" " " "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 "" " " "MS-Windows ARM64 console version" msgstr "" -#: ../version.c:4056 +#: ../version.c:4060 msgid "" " " "MS-Windows 64-bit console version" msgstr "" -#: ../version.c:4059 +#: ../version.c:4063 msgid "" " " "MS-Windows 32-bit console version" msgstr "" -#: ../version.c:4065 +#: ../version.c:4069 msgid "" " " "macOS version" msgstr "" -#: ../version.c:4067 +#: ../version.c:4071 msgid "" " " "macOS version w/o darwin feat." msgstr "" -#: ../version.c:4077 +#: ../version.c:4081 msgid "" " " "OpenVMS version" msgstr "" -#: ../version.c:4092 +#: ../version.c:4096 msgid "" " " "Included patches: " msgstr "" -#: ../version.c:4117 +#: ../version.c:4121 msgid "" " " "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 "" " " "Compiled " msgstr "" -#: ../version.c:4139 +#: ../version.c:4143 msgid "by " msgstr "" -#: ../version.c:4151 +#: ../version.c:4155 msgid "" " " "Huge version " msgstr "" -#: ../version.c:4153 +#: ../version.c:4157 msgid "" " " "Normal version " msgstr "" -#: ../version.c:4155 +#: ../version.c:4159 msgid "" " " "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 (-): " 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 index 000000000..40ec5ce13 --- /dev/null +++ b/src/testdir/dumps/Test_long_file_name_2.dump @@ -0,0 +1,8 @@ +> +0&#ffffff0@74 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|<+0#0000000&|x@53|"| |0|L|,| |0|B| @11 diff --git a/src/testdir/test_display.vim b/src/testdir/test_display.vim index 5f597f133..61a7e3cf7 100644 --- a/src/testdir/test_display.vim +++ b/src/testdir/test_display.vim @@ -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 diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim index 084646699..af097a295 100644 --- a/src/testdir/test_options.vim +++ b/src/testdir/test_options.vim @@ -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 diff --git a/src/version.c b/src/version.c index 347875822..9fd90fa34 100644 --- a/src/version.c +++ b/src/version.c @@ -719,6 +719,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1550, /**/ 1549, /**/ -- -- 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 vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1ublLs-007hg8-9H%40256bit.org.