summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-09-02 14:07:36 +0200
committerBram Moolenaar <Bram@vim.org>2011-09-02 14:07:36 +0200
commit6c167c645124aca84ac3b57b5fd3b56f16593091 (patch)
treeeeeb499eefa3820333f4946c15a9732e5ea9f86c /src/screen.c
parent6fabcbe26002fd75f87c6775239b0e51e1169d68 (diff)
downloadvim-6c167c645124aca84ac3b57b5fd3b56f16593091.zip
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)
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c
index 40d48ee22..2c87e9b9e 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2531,7 +2531,9 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
/* 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;