Bug#465330: vim-scripts: xml.vim only works for first buffer with ft=xml

Marvin Renich mrvn at renich.org
Mon Feb 11 21:01:49 UTC 2008


Package: vim-scripts
Version: 7.1.5
Severity: normal

If you have enabled xml.vim from vim-scripts (overriding the xml.vim
from vim-runtime), and you load several buffers with filetype xml, the
mappings are only loaded for the first xml buffer.

I checked the source for 7.1.6 and xml.vim did not change, so this
affects both versions.

A possible fix is to change the code at the top from this:

" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") || exists("loaded_xml_ftplugin")
  finish
endif
let b:did_ftplugin = 1
let loaded_xml_ftplugin = 1

To something like this:

if exists("b:did_ftplugin")
  finish
endif
let b:did_ftplugin = 1
" (copy buffer-local stuff from the bottom of the script to here)
if exists("loaded_xml_ftplugin")
  finish
endif
let loaded_xml_ftplugin = 1

...Marvin


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.20 (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

vim-scripts depends on no packages.

Versions of packages vim-scripts recommends:
ii  vim                          1:7.1-241+1 Vi IMproved - enhanced vi editor
ii  vim-addon-manager            0.4         manager of addons for the Vim edit
ii  vim-gtk [gvim]               1:7.1-241+1 Vi IMproved - enhanced vi editor -

-- no debconf information





More information about the pkg-vim-maintainers mailing list