Bug#308865: vim-common: matchit.vim problems with fortran 90 module procedure statements
Kamaraju Kusumanchi
Kamaraju Kusumanchi <kamaraju@gmail.com>, 308865@bugs.debian.org
Thu, 12 May 2005 16:42:48 -0400
Package: vim-common
Version: 1:6.3-071+1
Severity: normal
To reproduce the bug consider the Fortran 90 code attached in the end. This is
a valid Fortran 90 program which compiles and runs just fine.
Open the file in (g)vim and source /usr/share/vim/vim63/macros/matchit.vim
Now place the cursor on line 14 and press %. The cursor goes to the line 18.
This is the intended behaviour of the matchit plugin. But If the cursor is
placed on line 1 and % is pressed then nothing happens. Ideally module and end
module statements (line 1,19 respectively) should match with each other with %.
This is not happening because there is a match between line 4 and line 19 due to
the occurence of the word module in line4.
$cat -n matchitbug.f90
1 module match
2 implicit none
3 INTERFACE print_a_number
4 module procedure print_real, print_integer
5 END INTERFACE print_a_number
6 contains
7
8 subroutine print_real(r)
9 implicit none
10 real :: r
11 write(*,*) 'real number = ', r
12 end subroutine print_real
13
14 subroutine print_integer(i)
15 implicit none
16 integer :: i
17 write(*,*) 'integer = ', i
18 end subroutine print_integer
19 end module match
20
21 program testsuite
22 use match
23 call print_a_number(2.3)
24 call print_a_number(5)
25 end program testsuite
$gfortran matchitbug.f90
$./a.out
real number = 2.300000
integer = 5
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.9-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages vim-common depends on:
ii vim 1:6.3-071+1 Vi IMproved - enhanced vi editor
-- no debconf information