Bram Moolenaar wrote:

Apparently something goes wrong in block_prep(), just before calling
yank_copy_line().  If you can put a breakpoint in block_prep() and step
through it to find out why bdp->startspaces ends up being negative, and
textlen zero, that will help a lot.  Look out for an overflow somewhere.
Perhaps in line 4966?  Actually, knowing the values in oap will help:
        print *oap

4966                    bdp->startspaces = oap->end_vcol - oap->start_vcol + 1;
(gdb) p *oap
$30 = {op_type = 3, regname = 45, motion_type = 0, motion_force = 0,
  use_reg_one = 0, inclusive = 1, end_adjusted = 0, start = {lnum = 1,
    col = 2, coladd = 0}, end = {lnum = 1, col = 0, coladd = 0},
  cursor_start = {lnum = 0, col = 0, coladd = 0}, line_count = 1, empty = 0,
  is_VIsual = 1, block_mode = 1, start_vcol = 2, end_vcol = 0,
  prev_opcount = 0, prev_count0 = 0}
(gdb) n
4967                    if (is_del && oap->op_type != OP_LSHIFT)
(gdb) p bdp->startspaces
$31 = -1
(gdb) n
5018            bdp->end_char_vcols = incr;
(gdb) p incr
$32 = 1
(gdb) n
5020            if (is_del && bdp->startspaces)
(gdb) p is_del
$33 = 0
(gdb) n
5022            bdp->textlen = (int)(pend - pstart);
(gdb) p pend
$34 = (char_u *) 0xbba49ffd "  "
(gdb) p pstart
$35 = (char_u *) 0xbba49ffd "  "
(gdb) where
#0  block_prep (oap=0xbfbfeae8, bdp=0xbfbfe770, lnum=1, is_del=0) at ops.c:5022
#1  0x08114398 in op_yank (oap=0xbfbfeae8, deleting=1, mess=0) at ops.c:2925
#2  0x08112144 in op_delete (oap=0xbfbfeae8) at ops.c:1725
#3  0x08113d11 in op_change (oap=0xbfbfeae8) at ops.c:2634
#4  0x08104faa in do_pending_operator (cap=0xbfbfea3c, old_col=2147483647,
    gui_yank=0) at normal.c:1953
#5  0x08103b19 in normal_cmd (oap=0xbfbfeae8, toplevel=1) at normal.c:1214
#6  0x080cfb88 in main_loop (cmdwin=0, noexmode=0) at main.c:1211
#7  0x080cf76f in main (argc=2, argv=0xbfbfec9c) at main.c:955

> If these values look wrong, look at the code that sets them: about line
> 1660 in normal.c

Why is oap->end_vcol zero? I'll continue tomorrow with this...

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