patch 8.2.3432: octave/Matlab filetype detection does not work properly
Problem: Octave/Matlab filetype detection does not work properly.
Solution: Update the patterns used for matching. (Doug Kearns)
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 94db223..cd6e71d 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -893,16 +893,6 @@
call assert_equal('octave', &filetype)
bwipe!
- call writefile(['#{', 'Octave block comment', '#}'], 'Xfile.m')
- split Xfile.m
- call assert_equal('octave', &filetype)
- bwipe!
-
- call writefile(['%{', 'Octave block comment', '%}'], 'Xfile.m')
- split Xfile.m
- call assert_equal('octave', &filetype)
- bwipe!
-
call writefile(['%!test "Octave test"'], 'Xfile.m')
split Xfile.m
call assert_equal('octave', &filetype)
@@ -913,7 +903,7 @@
call assert_equal('octave', &filetype)
bwipe!
- call writefile(['function test(); 42; endfunction'], 'Xfile.m')
+ call writefile(['try; 42; end_try_catch'], 'Xfile.m')
split Xfile.m
call assert_equal('octave', &filetype)
bwipe!
@@ -925,6 +915,13 @@
call assert_equal('mma', &filetype)
bwipe!
+ " MATLAB
+
+ call writefile(['% MATLAB line comment'], 'Xfile.m')
+ split Xfile.m
+ call assert_equal('matlab', &filetype)
+ bwipe!
+
" Murphi
call writefile(['-- Murphi comment'], 'Xfile.m')
diff --git a/src/version.c b/src/version.c
index 053648a..7d87105 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3432,
+/**/
3431,
/**/
3430,