James Vega wrote:

> On Sat, Mar 07, 2009 at 04:30:30PM -0500, James Vega wrote:
>> There seems to be an edge case when positioning the cursor and
>> 'virtualedit' is set to all that causes gvim to crash.  This was
>> introduced between 6.4 and 7.0b.
>>
>> It can be reproduced using the attached files as follows:
>>
>>   gvim -u NONE -N -S crash.vim crash.txt
>
> Actually attached this time.
>
> --
> James


Thanks.  I can reproduce it with Vim-7.2.132 (huge)
GTK2-GNOME.

I see that windgoto() is called with with a negative col
(-2147483646).  Call stack when it happens is:

#4  0x08190cd9 in windgoto (row=14, col=-2147483646) at screen.c:7888
#5  0x0819125e in setcursor () at screen.c:8118
#6  0x08107c16 in main_loop (cmdwin=0, noexmode=0) at main.c:1143
#7  0x081077e3 in main (argc=11, argv=0xbfd32a14) at main.c:939


I don't know why yet (I'll try to find out when I have time)
but in the mean time, attached patch works around it.

-- Dominique

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Index: screen.c
===================================================================
RCS file: /cvsroot/vim/vim7/src/screen.c,v
retrieving revision 1.114
diff -c -r1.114 screen.c
*** screen.c	22 Feb 2009 20:13:34 -0000	1.114
--- screen.c	8 Mar 2009 09:43:30 -0000
***************
*** 7879,7884 ****
--- 7879,7886 ----
  	    row = 0;
  	if (row >= screen_Rows)
  	    row = screen_Rows - 1;
+ 	if (col < 0)	/* why would this happen? */
+ 	    col = 0;
  	if (col >= screen_Columns)
  	    col = screen_Columns - 1;
  

Raspunde prin e-mail lui