]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(c): only set keywordprg when there has 'man'
authorMao-Yining <101858210+mao-yining@users.noreply.github.com>
Tue, 3 Feb 2026 14:51:24 +0000 (14:51 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 3 Feb 2026 14:51:24 +0000 (14:51 +0000)
closes: #19319

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/ftplugin/c.vim

index 2793c5d46ad9739b1ddf94d77e52aae08d82cc6f..97111121c31e5812bf386841eb7bb9c744edc3e6 100644 (file)
@@ -1,7 +1,7 @@
 " Vim filetype plugin file
 " Language:    C
 " Maintainer:  The Vim Project <https://github.com/vim/vim>
-" Last Change: 2026 Jan 26
+" Last Change: 2026 Feb 3
 " Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 " Only do this when not done yet for this buffer
@@ -41,7 +41,7 @@ if has("vms")
 endif
 
 " Use terminal window for gui
-if has('gui_running') && exists(':terminal') == 2
+if has('gui_running') && exists(':terminal') == 2 && executable("man")
   setlocal keywordprg=:CKeywordPrg
 
   command! -buffer -nargs=1 -count CKeywordPrg call s:CKeywordPrg(<q-args>, <count>)