I posted this originally on vim_use but only got one response, from
someone who thinks it's a bug. The original thread is here:

http://groups.google.com/group/vim_use/browse_thread/thread/d93a0878b9a5bb91/8619edd9992fdd20

Basically, I have two tabs open, each with a single buffer loaded, and
a BufRead autocmd that will fire when the file in one of the tabs is
(re)loaded. This BufRead autocmd sets the "wrap" option locally. When
the autocmd fires, the buffer in the currently active tab gets the
option, regardless of whether this is the buffer being reloaded.

Test case for reproduction is as follows:
vim -u NONE -N -i NONE

:autocmd BufRead *.txt setlocal wrap
:view test.txt
:tabe test.c
:setlocal nowrap

Now modify test.txt outside of Vim and give focus back to Vim to
trigger a reload of test.txt.

Vim is still in the test.c tab. When the BufRead autocmd fires, 'wrap'
is set for test.c instead of test.txt.

Is this a bug? If not, please explain :-)

I'm running gvim 7.2.160 on MS Windows (the "Cream" build).
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui