Commit: patch 9.1.0243: filetype: netrw history file is not recognized

4 views
Skip to first unread message

Christian Brabandt

unread,
Mar 31, 2024, 1:30:12 PM3/31/24
to vim...@googlegroups.com
patch 9.1.0243: filetype: netrw history file is not recognized

Commit: https://github.com/vim/vim/commit/abbb4a4f7032de9e223293182402af5e2867e372
Author: Wu, Zhenyu <wuzh...@ustc.edu>
Date: Sun Mar 31 19:20:14 2024 +0200

patch 9.1.0243: filetype: netrw history file is not recognized

Problem: filetype: netrw history file is not recognized
Solution: Detect .netrwhist as vim files (Wu, Zhenyu)

closes: #14364

Signed-off-by: Wu, Zhenyu <wuzh...@ustc.edu>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index be59bc0d5..c06a05629 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -2436,7 +2436,7 @@ au BufNewFile,BufRead *.tape setf vhs
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst,*.vho setf vhdl

" Vim script
-au BufNewFile,BufRead *.vim,.exrc,_exrc setf vim
+au BufNewFile,BufRead *.vim,.exrc,_exrc,.netrwhist setf vim

" Viminfo file
au BufNewFile,BufRead .viminfo,_viminfo setf viminfo
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 91fc51718..c4a57a090 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -785,7 +785,7 @@ def s:GetFilenameChecks(): dict<list<string>>
vgrindefs: ['vgrindefs'],
vhdl: ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst', 'file.vhdl_123', 'file.vho', 'some.vhdl_1', 'some.vhdl_1-file'],
vhs: ['file.tape'],
- vim: ['file.vim', '.exrc', '_exrc', 'some-vimrc', 'some-vimrc-file', 'vimrc', 'vimrc-file'],
+ vim: ['file.vim', '.exrc', '_exrc', 'some-vimrc', 'some-vimrc-file', 'vimrc', 'vimrc-file', '.netrwhist'],
viminfo: ['.viminfo', '_viminfo'],
vmasm: ['file.mar'],
voscm: ['file.cm'],
diff --git a/src/version.c b/src/version.c
index f236655fe..b89c6c874 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 243,
/**/
242,
/**/
Reply all
Reply to author
Forward
0 new messages