From b9d57fa107a456596e68d2ee3853ba75142a6930 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 13 Sep 2021 10:00:09 +0200 Subject: vim-patch:8.2.3432: octave/Matlab filetype detection does not work properly (#15652) Problem: Octave/Matlab filetype detection does not work properly. Solution: Update the patterns used for matching. (Doug Kearns) https://github.com/vim/vim/commit/ca0627df69c29508f6f797bef27a1f5fa9a447d3 --- runtime/autoload/dist/ft.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime') diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 48a9657cf5..7484149a26 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -269,7 +269,8 @@ func dist#ft#FTm() return endif - let octave_block_terminators = '\' + " excluding end(for|function|if|switch|while) common to Murphi + let octave_block_terminators = '\' let n = 1 let saw_comment = 0 " Whether we've seen a multiline comment leader. @@ -285,8 +286,7 @@ func dist#ft#FTm() 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 -- cgit