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/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index 48a9657..7484149 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -269,7 +269,8 @@
return
endif
- let octave_block_terminators = '\<end\%(_try_catch\|classdef\|enumeration\|events\|for\|function\|if\|methods\|parfor\|properties\|switch\|while\)\>'
+ " excluding end(for|function|if|switch|while) common to Murphi
+ let octave_block_terminators = '\<end\%(_try_catch\|classdef\|enumeration\|events\|methods\|parfor\|properties\)\>'
let n = 1
let saw_comment = 0 " Whether we've seen a multiline comment leader.
@@ -285,8 +286,7 @@
setf objc
return
endif
- if line =~ '^\s*\%(#\|%!\|[#%]{\=\s*$\)' ||
- \ line =~ '^\s*unwind_protect\>' ||
+ if line =~ '^\s*\%(#\|%!\)' || line =~ '^\s*unwind_protect\>' ||
\ line =~ '\%(^\|;\)\s*' .. octave_block_terminators
setf octave
return