comparison src/screen.c @ 3040:b6af1c5dd22f v7.3.292

updated for version 7.3.292 Problem: Crash when using fold markers and selecting a visual block that includes a folded line and goes to end of line. (Sam Lidder) Solution: Check for the column to be MAXCOL. (James Vega)
author Bram Moolenaar <bram@vim.org>
date Fri, 02 Sep 2011 14:07:36 +0200
parents 1bb6776fa8c4
children 927c7377cf49
comparison
equal deleted inserted replaced
3039:ba4c4df5c958 3040:b6af1c5dd22f
2529 if (VIsual_mode == Ctrl_V) 2529 if (VIsual_mode == Ctrl_V)
2530 { 2530 {
2531 /* Visual block mode: highlight the chars part of the block */ 2531 /* Visual block mode: highlight the chars part of the block */
2532 if (wp->w_old_cursor_fcol + txtcol < (colnr_T)W_WIDTH(wp)) 2532 if (wp->w_old_cursor_fcol + txtcol < (colnr_T)W_WIDTH(wp))
2533 { 2533 {
2534 if (wp->w_old_cursor_lcol + txtcol < (colnr_T)W_WIDTH(wp)) 2534 if (wp->w_old_cursor_lcol != MAXCOL
2535 && wp->w_old_cursor_lcol + txtcol
2536 < (colnr_T)W_WIDTH(wp))
2535 len = wp->w_old_cursor_lcol; 2537 len = wp->w_old_cursor_lcol;
2536 else 2538 else
2537 len = W_WIDTH(wp) - txtcol; 2539 len = W_WIDTH(wp) - txtcol;
2538 RL_MEMSET(wp->w_old_cursor_fcol + txtcol, hl_attr(HLF_V), 2540 RL_MEMSET(wp->w_old_cursor_fcol + txtcol, hl_attr(HLF_V),
2539 len - (int)wp->w_old_cursor_fcol); 2541 len - (int)wp->w_old_cursor_fcol);