summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin/eruby.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:40:16 +0000
commit6af24b2457752c0d36aaf9f29f03d39afd09937f (patch)
tree2671b594908d1f971de6b2a2d473f97dfb7291d2 /runtime/ftplugin/eruby.vim
parentReleasing progress-linux version 2:9.1.0016-1~progress7.99u1. (diff)
downloadvim-6af24b2457752c0d36aaf9f29f03d39afd09937f.tar.xz
vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/ftplugin/eruby.vim')
-rw-r--r--runtime/ftplugin/eruby.vim11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim
index 893fa58..b5c4665 100644
--- a/runtime/ftplugin/eruby.vim
+++ b/runtime/ftplugin/eruby.vim
@@ -4,6 +4,7 @@
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 May 15
+" 2024 Jan 14 by Vim Project (browsefilter)
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -15,7 +16,11 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
-let s:browsefilter = "All Files (*.*)\t*.*\n"
+if has("win32")
+ let s:browsefilter = "All Files (*.*)\t*\n"
+else
+ let s:browsefilter = "All Files (*)\t*\n"
+endif
let s:match_words = ""
if !exists("g:eruby_default_subtype")
@@ -109,8 +114,8 @@ exe 'cmap <buffer><script><expr> <Plug><cfile> ErubyAtCursor() ? ' . maparg('<Pl
exe 'cmap <buffer><script><expr> <Plug><ctag> ErubyAtCursor() ? ' . maparg('<Plug><ctag>', 'c') . ' : ' . get(s:ctagmap, 'rhs', '"\022\027"')
unlet s:cfilemap s:ctagmap s:include s:path s:suffixesadd
-" Change the browse dialog on Win32 to show mainly eRuby-related files
-if has("gui_win32")
+" Change the browse dialog on Win32 and GTK to show mainly eRuby-related files
+if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="eRuby Files (*.erb, *.rhtml)\t*.erb;*.rhtml\n" . s:browsefilter
endif