Dimitar DIMITROV wrote:

>> Dimitar DIMITROV wrote:
>> > Hi,
>> >
>> > 1. :help
>> > 2. 10GVj<esc>
>> > 3. :ene
>> > 4. Use <MiddleMouse> to paste the text but don't do it above line 1
>> > 5. u
>> > 6. Use <MiddleMouse> to paste the text and do it above line 1
>> > 7. ddu^R
>> >
>> > Error message:
>> >
>> > E315: ml_get: invalid lnum: 3
>> > E315: ml_get: invalid lnum: 3
>>
>>
>> I can't reproduce it.
>>
>> What would be useful, is for you to put a breakpoint in a debugger
>> at memline.c:2452 where E315 happens and send us the stack.
>>
>> I suspect that a plugin has an autocommand which could trigger
>> this. Which plugins are you using?  What autocommands are in
>> your ~/.vimrc?
>>
>> How about also enabling plugins one at at time to see which once
>> triggers the bug.
>>
>> -- Dominique
>
> Thanks for the suggestions. I was finally able to isolate the problem. The
> above steps will raise the error if one starts like this (see below) AND the
> <MiddleMouse> clicks are NOT above column one:
>
> gvim.exe "+se nocp ve=all nosol" -u NONE -U NONE
>
> I love ve=all but it seems to be a bit fragile


Thanks Dimitar.  Just to confirm that I can now reproduce it too
with both Vim-7.2.446 and Vim-7.3e BETA (2498:3c51864309bc)
using your indications.


Some info with gdb:

(gdb) br memline.c:2452
Breakpoint 1 at 0x80f9704: file memline.c, line 2452.

(gdb) run
Starting program: /home/pel/pristine/vim/src/vim -f -g +se\ nocp\
ve=all\ nosol -u NONE -U NONE
[Thread debugging using libthread_db enabled]

Breakpoint 1, ml_get_buf (buf=0x82bbe48, lnum=3, will_change=0) at
memline.c:2452
2452                EMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);

(gdb) list memline.c:2452
2447            if (recursive == 0)
2448            {
2449                /* Avoid giving this message for a recursive call, may 
happen when
2450                 * the GUI redraws part of the text. */
2451                ++recursive;
2452                EMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum);
2453                --recursive;
2454            }
2455    errorret:
2456            STRCPY(IObuff, "???");

(gdb) bt
#0  ml_get_buf (buf=0x82bbe48, lnum=3, will_change=0) at memline.c:2452
#1  0x081161f4 in coladvance2 (pos=0x82b0684, addspaces=0, finetune=1,
wcol=41) at misc2.c:159
#2  0x0811616a in getvpos (pos=0x82b0684, wcol=41) at misc2.c:129
#3  0x081160e6 in coladvance (wcol=41) at misc2.c:106
#4  0x081c3b37 in u_undoredo (undo=0) at undo.c:2599
#5  0x081c29e1 in u_doit (startcount=1) at undo.c:2004
#6  0x081c2869 in u_redo (count=1) at undo.c:1941
#7  0x08132184 in nv_redo (cap=0xbffff16c) at normal.c:8371
#8  0x081268fc in normal_cmd (oap=0xbffff22c, toplevel=1) at normal.c:1190
#9  0x080e8350 in main_loop (cmdwin=0, noexmode=0) at main.c:1260
#10 0x080e7d85 in main (argc=8, argv=0xbffff474) at main.c:965

(gdb) p lnum
$1 = 3
(gdb) p buf->b_ml.ml_line_count
$2 = 2

-- Dominique

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui