mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Don't allow Fortran if without then, fixes #63
This commit is contained in:
@@ -4,8 +4,6 @@ set cpo&vim
|
||||
|
||||
call matchup#util#patch_match_words('\<if', '\<if\>')
|
||||
call matchup#util#patch_match_words('\<end\s*if', '\<end\>\s*if')
|
||||
call matchup#util#patch_match_words('then\>', '\%(then\>\)\=')
|
||||
call matchup#util#patch_match_words('then\)\=\>', '\%(then\>\)\=\)\=')
|
||||
|
||||
call matchup#util#append_match_words(
|
||||
\ '^\s*#\s*if\(\|def\|ndef\)\>'
|
||||
|
||||
16
test/issues/63/test.f90
Normal file
16
test/issues/63/test.f90
Normal file
@@ -0,0 +1,16 @@
|
||||
program matchup_parsing
|
||||
real :: x = 1.0, y = 2.0, a
|
||||
|
||||
|
||||
if (x < y) then
|
||||
if (x == 0) stop
|
||||
a = y / x
|
||||
else
|
||||
if (y == 0) stop ! matchup sees corresponding `if - end if` pairs from HERE
|
||||
a = x / y
|
||||
end if ! to HERE
|
||||
|
||||
write(*, *) a
|
||||
|
||||
end program
|
||||
|
||||
Reference in New Issue
Block a user