changeset 34727:eac204857d17 v9.1.0242

patch 9.1.0242: filetype: octave history files are not recognized Commit: https://github.com/vim/vim/commit/be71ac694f623e162f1ecb7a182bdf2fd281591f Author: Wu, Zhenyu <wuzhenyu@ustc.edu> Date: Sun Mar 31 19:18:10 2024 +0200 patch 9.1.0242: filetype: octave history files are not recognized Problem: filetype: octave history files are not recognized Solution: Detect octave/history files as octave (Wu, Zhenyu) closes: #14363 Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 31 Mar 2024 19:30:04 +0200
parents 1dcdcc859b91
children 26ebf1057d50
files runtime/filetype.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1501,7 +1501,7 @@ au BufNewFile,BufRead *.ml,*.mli,*.mll,*
 au BufNewFile,BufRead *.occ			setf occam
 
 " Octave
-au BufNewFile,BufRead octave.conf,.octaverc,octaverc	setf octave
+au BufNewFile,BufRead octave.conf,.octaverc,octaverc,*/octave/history	setf octave
 
 " Odin
 au BufNewFile,BufRead *.odin			setf odin
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -503,7 +503,7 @@ def s:GetFilenameChecks(): dict<list<str
     obse: ['file.obl', 'file.obse', 'file.oblivion', 'file.obscript'],
     ocaml: ['file.ml', 'file.mli', 'file.mll', 'file.mly', '.ocamlinit', 'file.mlt', 'file.mlp', 'file.mlip', 'file.mli.cppo', 'file.ml.cppo'],
     occam: ['file.occ'],
-    octave: ['octaverc', '.octaverc', 'octave.conf'],
+    octave: ['octaverc', '.octaverc', 'octave.conf', 'any/.local/share/octave/history'],
     odin: ['file.odin'],
     omnimark: ['file.xom', 'file.xin'],
     opam: ['opam', 'file.opam', 'file.opam.template'],
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    242,
+/**/
     241,
 /**/
     240,