diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-09-12 17:03:08 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-09-12 17:03:08 +0200 |
commit | ca0627df69c29508f6f797bef27a1f5fa9a447d3 (patch) | |
tree | c46daa76bf1ba8011468831de5524a41d19d0ea9 /runtime | |
parent | dfe04dbff5863f6c089da8831d7ac2a3421a44b7 (diff) | |
download | vim-git-ca0627df69c29508f6f797bef27a1f5fa9a447d3.tar.gz |
patch 8.2.3432: octave/Matlab filetype detection does not work properlyv8.2.3432
Problem: Octave/Matlab filetype detection does not work properly.
Solution: Update the patterns used for matching. (Doug Kearns)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/dist/ft.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 48a9657cf..7484149a2 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 = '\<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 @@ 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 |