summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin/c.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
commitaafdfa61bb0af95e98ca825d1f7839801c22d434 (patch)
treeb792417ed6c2f7764f816aecd177e46b1baad149 /runtime/ftplugin/c.vim
parentAdding debian version 2:9.1.0016-1. (diff)
downloadvim-aafdfa61bb0af95e98ca825d1f7839801c22d434.tar.xz
vim-aafdfa61bb0af95e98ca825d1f7839801c22d434.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/ftplugin/c.vim')
-rw-r--r--runtime/ftplugin/c.vim32
1 files changed, 17 insertions, 15 deletions
diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim
index 4ddc4a5..e2eebc5 100644
--- a/runtime/ftplugin/c.vim
+++ b/runtime/ftplugin/c.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2023 Aug 10
+" Last Change: 2023 Aug 22
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
@@ -48,24 +48,26 @@ if !exists("b:match_words")
let b:undo_ftplugin ..= " | unlet! b:match_skip b:match_words"
endif
-" Win32 can filter files in the browse dialog
+" Win32 and GTK can filter files in the browse dialog
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
if &ft == "cpp"
- let b:browsefilter = "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
- \ "C Header Files (*.h)\t*.h\n" .
- \ "C Source Files (*.c)\t*.c\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "C++ Source Files (*.cpp, *.c++)\t*.cpp;*.c++\n" ..
+ \ "C Header Files (*.h)\t*.h\n" ..
+ \ "C Source Files (*.c)\t*.c\n"
elseif &ft == "ch"
- let b:browsefilter = "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" .
- \ "C Header Files (*.h)\t*.h\n" .
- \ "C Source Files (*.c)\t*.c\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "Ch Source Files (*.ch, *.chf)\t*.ch;*.chf\n" ..
+ \ "C Header Files (*.h)\t*.h\n" ..
+ \ "C Source Files (*.c)\t*.c\n"
else
- let b:browsefilter = "C Source Files (*.c)\t*.c\n" .
- \ "C Header Files (*.h)\t*.h\n" .
- \ "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" .
- \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
- \ "All Files (*.*)\t*.*\n"
+ let b:browsefilter = "C Source Files (*.c)\t*.c\n" ..
+ \ "C Header Files (*.h)\t*.h\n" ..
+ \ "Ch Source Files (*.ch, *.chf)\t*.ch;*.chf\n" ..
+ \ "C++ Source Files (*.cpp, *.c++)\t*.cpp;*.c++\n"
+ endif
+ if has("win32")
+ let b:browsefilter ..= "All Files (*.*)\t*\n"
+ else
+ let b:browsefilter ..= "All Files (*)\t*\n"
endif
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif