James Vega wrote:
> If one uses <C-v>$ to start visual-block mode, and then moves the cursor
> over a fold, Vim will crash. As a simple test, you can follow the
> commands below with this email.
>
> " :set fdm=3Dmarker
> " zM
> " <C-v>$jG
> {{{
> screen.c:
> 2534 if (wp->w_old_cursor_lcol + txtcol < (colnr_T)W_WIDTH(wp))=C2=B6
> 2535 len =3D wp->w_old_cursor_lcol;=C2=B6
> 2536 else=C2=B6
> 2537 len =3D W_WIDTH(wp) - txtcol;=C2=B6
> 2538 RL_MEMSET(wp->w_old_cursor_fcol + txtcol, hl_attr(HLF_V),=C2=B6
> 2539 len - (int)wp->w_old_cursor_fcol);=C2=B6
> }}}
>
> This is due to wp->w_old_cursor_lcol being set to MAXCOL, so the sum in
> the above comparison overflows and incorrectly causes the comparison to
> succeed. So, RL_MEMSET walks off the end of ScreenAttrs.
>
> Attached patch fixes the problem.
Thanks! I was just looking into this problem. Your patch seems like
it's the right solution.
--
|
Ceci n'est pas une pipe.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
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