tags:

views:

44

answers:

0

There's something weird going on in my fortran folding. This is the example file

module foo
contains
subroutine hello()

end subroutine hello
subroutine hello()

end subroutine

subroutine hello()

end subroutine
end module foo

subroutine hello()

end subroutine
subroutine hello()

end subroutine
subroutine hello()

end subroutine

and this is the vimrc

syntax on
au! BufRead,BufNewFile *.f90 setfiletype fortran
set foldmethod=syntax
let fortran_fold=1

The annoying thing is the following. If I cut (dd) and paste (P) a folded subroutine outside the module/end module block, the freshly pasted fold stay closed. If I paste it inside the module/end module block, the newly pasted folded region appears instead unfolded. Can you reproduce the issue (vim 7.2 here) and do you know any workaround/fix ?