Mercurial > vim
changeset 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 | ba4c4df5c958 |
children | cb5491b26cab |
files | src/screen.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -2531,7 +2531,9 @@ fold_line(wp, fold_count, foldinfo, lnum /* Visual block mode: highlight the chars part of the block */ if (wp->w_old_cursor_fcol + txtcol < (colnr_T)W_WIDTH(wp)) { - if (wp->w_old_cursor_lcol + txtcol < (colnr_T)W_WIDTH(wp)) + if (wp->w_old_cursor_lcol != MAXCOL + && wp->w_old_cursor_lcol + txtcol + < (colnr_T)W_WIDTH(wp)) len = wp->w_old_cursor_lcol; else len = W_WIDTH(wp) - txtcol;