On 5/6/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote:
Eric Arnold wrote:
One more try, got a mailer daemon error.
> On 5/6/06, Eric Arnold <[EMAIL PROTECTED]> wrote:
> > Thanks. It works great when entering existing tabs, but there is still
> > something odd when a tab is entered via "tabnew". I am able to open a new
> > window in the new tab, but I end up with one NoName default window,
> > and one window with a buffer from the first tab, not the buffer I
> > specified ("testbufname") with
> >
> > function! Tst_TabEnter()
> > echomsg 'tabenter'
> > new testbufname
> > endfunction
When a new tab is created the TabEnter autocommand is triggered before
editing the new file. Thus what happens:
vim file1
:tabnew somefile
Vim creates new tab by splitting "file1", you now have two tabs
with "file1"
TabEnter kicks in, splitting the window and creating
"testbufname"
Vim edits "somefile", "testbufname" is lost
If you want to get proper behavior use:
function! Tst_TabEnter()
echomsg 'tabenter'
new testbufname
wincmd p
endfunction
Thanks. Now I can make my windows follow me around :-)
> > BTW, what's the right utility to apply your patch? My Cygwin "patch" is
> > rejecting it, despite it's simplicity (I applied it by hand).
Check the line endings (dos/unix). Cygwin patch doesn't work very well
with a mix.
The tabs and whitespace got changed by the mail agents.