From: Ben Armstrong, Thu, August 23, 2007 7:21 am
> Ben Armstrong wrote:
> > >
> > > I think this may be Vim working in the background. All sorts of
> > > unamed buffers are created in practice, Cream can usually delete
> > > them or avoid creating new ones via various autocmds. But when
> > > you pass an argument in from an outside application, Vim acts
> > > before Cream and we get a slightly dis-organized environment.
> > > Window > Tabs > Refresh Tabs should usually fix this.
> > 
> > That does nothing in my case.
> 
> In fact, this morning when I was trying to debug Peter's report to
> me that while he sees the first and second tabs, opening a third
> file does not create a third tab, but merely replaces the one on
> top, I tried "Refresh Tabs" after the third open to see what would
> happen.  Lo and behold, two empty "Untitled" tabs appeared!  So I
> guess these extra buffers are being created all the time.  We just
> don't normally see them.

Yes, Vim creates a new buffer for practically every file action. Cream
filters most, but occasionally one gets through our autocmd traps.

> You may recall that in our cream-user.vim we have an 'after open'
> hook set up to create a lockfile for selected files being edited.
> When I comment out in the hook the call to "Cream_touch()" so that
> the lockfile isn't created, both problems go away! So I need some
> ideas about how we can still create the lock file without causing
> these problems. Any clues?

You could either fix Cream_touch() to not create the un-named,
un-modified buffers, or just delete them after the fact with
Cream_buffers_delete_untitled(). Then make the buffer you want active
current and call Cream_tabpages_refresh().


-- 
Steve Hall  [ digitect dancingpaper com ]
:: Cream... usability for Vim
::   http://cream.sourceforge.net


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
cream-general mailing list
cream-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cream-general

Reply via email to