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
> > 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.
--
hundred-and-one symptoms of being an internet addict:
32. You don't know what sex three of your closest friends are, because they
have neutral nicknames and you never bothered to ask.
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///