vim-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: vim/vim#17739

https://github.com/vim/vim/commit/3f9d2378bd70748fc59e02a402422269bd096492

Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2025-09-18 08:07:43 +08:00
parent 3c480fca57
commit 8964ad45da
4 changed files with 17 additions and 3 deletions
-1
View File
@@ -77,7 +77,6 @@ Defaults *defaults* *nvim-defaults*
- 'ruler' is enabled
- 'sessionoptions' includes "unix,slash", excludes "options"
- 'shortmess' includes "CF", excludes "S"
- 'showcmd' is enabled
- 'sidescroll' defaults to 1
- 'smarttab' is enabled
- 'spellfile' defaults to `stdpath("data").."/site/spell/"`
+1 -1
View File
@@ -19,7 +19,7 @@ if exists('s:did_load')
set listchars=eol:$
set maxsearchcount=99
set mousemodel=extend
set nohidden nosmarttab noautoindent noautoread noruler noshowcmd
set nohidden nosmarttab noautoindent noautoread noruler
set nohlsearch noincsearch
set nrformats=bin,octal,hex
set sessionoptions+=options
+4 -1
View File
@@ -187,10 +187,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
+12
View File
@@ -2903,4 +2903,16 @@ func Test_set_missing_options()
set w9600=23
endfunc
func Test_showcmd()
throw 'Skipped: Nvim does not support support Vi-compatible mode'
" 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