Bug#301452: vim-common: fortran90 syntax synchronizing problem

Kamaraju Kusumanchi Kamaraju Kusumanchi <kk288@cornell.edu>, 301452@bugs.debian.org
Fri, 25 Mar 2005 19:42:27 -0500

Package: vim-common
Version: 1:6.3-067+2
Severity: normal

The syntax highlighting in fortran 90 programs is not synchronized
appropriately. To reproduce the problem consider the 57 lines file test.f90
(given at the end)

Open this file with the command
gvim -u NONE -U NONE + test.f90

Just make sure that the gvim window is opened with set columns=80, set
lines=24. Otherwise you will not be able to reproduce the bug,

Once the file is opened do

:syn on

start going up from bottom to top. Now you will see that the
paranthesis at the end are shown in red (indicating that there is a
mismatch). But in fact there is no mismatch and the program is a valid
fortran 90 program.

$cat test.f90

program test
  implicit none
  real :: array(10,20)

  array = reshape( array, &
  (/10, 20/), order=(/2,1/) )
  array = reshape( array, &
  (/10, 20/), order=(/2,1/) )
  array = reshape( array, &
  (/10, 20/), order=(/2,1/) ) 

end program test

A possible but non-optimal workaround for this problem is to put this line

syn sync fromstart

in the ~/.vim/after/syntax/fortran.vim

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
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-067+2 Vi IMproved - enhanced vi editor

-- no debconf information