diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2022-07-02 11:06:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-02 11:06:03 +0200 |
| commit | 662681694bf2e30b1f33ad235274c82a334ff742 (patch) | |
| tree | cf4292bcc982de08229567a046ce188d49de2d03 /runtime/autoload/freebasic.vim | |
| parent | a9de89894a2ff43dd511b38f20ab2815d6c7e2bd (diff) | |
| download | rneovim-662681694bf2e30b1f33ad235274c82a334ff742.tar.gz rneovim-662681694bf2e30b1f33ad235274c82a334ff742.tar.bz2 rneovim-662681694bf2e30b1f33ad235274c82a334ff742.zip | |
vim-patch:0d878b95d8f9 (#19197)
Update runtime files
https://github.com/vim/vim/commit/0d878b95d8f9ece2fdba81050f5caba224540f9c
Diffstat (limited to 'runtime/autoload/freebasic.vim')
| -rw-r--r-- | runtime/autoload/freebasic.vim | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/autoload/freebasic.vim b/runtime/autoload/freebasic.vim index 428cf1382b..6c94cd34ea 100644 --- a/runtime/autoload/freebasic.vim +++ b/runtime/autoload/freebasic.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: FreeBASIC " Maintainer: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2021 Mar 16 +" Last Change: 2022 June 24 " Dialects can be one of fb, qb, fblite, or deprecated " Precedence is forcelang > #lang > lang @@ -18,17 +18,16 @@ function! freebasic#GetDialect() abort " override with #lang directive or metacommand - let skip = "has('syntax_items') && synIDattr(synID(line('.'), col('.'), 1), 'name') =~ 'Comment$'" let pat = '\c^\s*\%(#\s*lang\s\+\|''\s*$lang\s*:\s*\)"\([^"]*\)"' let save_cursor = getcurpos() call cursor(1, 1) - let lnum = search(pat, 'n', '', '', skip) + let lnum = search(pat, 'cn') call setpos('.', save_cursor) if lnum let word = matchlist(getline(lnum), pat)[1] - if word =~? '\%(fb\|deprecated\|fblite\|qb\)' + if word =~? '\<\%(fb\|deprecated\|fblite\|qb\)\>' let dialect = word else echomsg "freebasic#GetDialect: Invalid lang, found '" .. word .. "' at line " .. lnum .. " " .. getline(lnum) |