[vim/vim] File open can't show Makefiles (Issue #12685)

22 views
Skip to first unread message

Daryl Lee

unread,
Jul 18, 2023, 12:33:49 PM7/18/23
to vim/vim, Subscribed

Steps to reproduce

in gvim 9.0.1189, in a directory with a Makefile (or any file with no extension, select menu item File -> Open to get the system File Open dialog box. Note that All Files is shown as (). Navigate to a folder where there are, say, C files. With All Files still selected, note that the C files do not appear. Change the file type selector to, say, C Source (.c,*.h). Now C source files are visible, and Makefiles are not. This is correct behavior.

Note that in the list of file types to show, All Files is given as (.). This means that files with no extension, such as Makefile, are not shown.

All Files should always be specified as (*, .)

Expected behaviour

Selecting All Files should make all files visible, including those with no extension

Version of Vim

gvim 9.0.1189

Environment

Ubuntu 23.04

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12685@github.com>

Christian Brabandt

unread,
Jul 18, 2023, 2:40:30 PM7/18/23
to vim/vim, Subscribed

This seems particularly bad using the GTK3 GUI, because you cannot override the filter :/

grafik

Hm, I suppose this does not only affect C files, but a lot of other file types.

Here is a patch for the c filetype plugin @brammool :

diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim
index 3627089ec..3acf37738 100644
--- a/runtime/ftplugin/c.vim
+++ b/runtime/ftplugin/c.vim
@@ -53,18 +53,18 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
     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"
+         \ "All Files\t*\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"
+         \ "All Files\t*\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"
+         \ "All Files\t*\n"
   endif
   let b:undo_ftplugin ..= " | unlet! b:browsefilter"
 endif

With this patch applied, this would look like this:
grafik

Note: This doesn't seem to be a problem in the Windows UI:
grafik


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12685/1640752204@github.com>

Christian Brabandt

unread,
Jan 14, 2024, 3:04:41 PM1/14/24
to vim/vim, Subscribed

Closed #12685 as completed via 93197fd.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/12685/issue_event/11482038357@github.com>

Reply all
Reply to author
Forward
0 new messages