Hi,

I started debugging my Cream wrapper script over a year ago when I was 
first testing Vim 7.1.  At that time, I ran into some problems which I 
posted about here, and got a bit of help, but never managed to finish 
fixing it.  This week, I returned to the problem.

I need to tell Cream to open a new file using --remote-send because 
otherwise if I specify a file to open on the command line, my open hook 
doesn't get executed.  When the wrapper detects that Cream is not yet 
running, it produces this command:


 >ruby cream.rb test.rb

START C:\Vim\vim71\gvim.exe --servername CREAM "+let 
$CREAM_FILE_OPEN=\"C:/test.rb\"" "<C-U>"


The "<C-U>" prevents Vim from opening a file when it starts up.  In 
cream-user.vim, I have a test for $CREAM_FILE_OPEN after all other 
settings are loaded.  If it is set, the file is opened using 
Cream_file_open().  This works.

When Cream is already running, the wrapper produces this command:

 >ruby cream.rb test.rb

START C:\Vim\vim71\gvim.exe --servername CREAM --remote-send "<C-O>:call 
Cream_file_open(\"C:/test.rb\")<CR>"


The wrapper is sending exactly the keystrokes I would type to open a 
file without using the menu.  When I hand type in Cream the keystrokes 
specified as the argument to --remote-send, the file open works without 
creating an extra buffer.  But when I send the keystrokes via 
--remote-send, an empty (Untitled) buffer is created in addition to a 
new buffer for the newly opened file.  If I have tabbed documents turned 
off, I am positioned in the extra buffer, so I have to switch to the new 
file buffer before I can start editing.  If I have tabbed documents 
turned on, the tab for the empty buffer is created between the previous 
tab and the new tab, and the focus is on the file I told cream to open, 
which is slightly less annoying, but still problematic.  I can't begin 
to imagine what's going on here.  Any hints for debugging?


Thanks,
Ben


-------------------------------------------------------------------------
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