diff options
author | Bram Moolenaar <bram@vim.org> | 2011-09-02 14:07:36 +0200 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2011-09-02 14:07:36 +0200 |
commit | 432e1a1b10853ce403801028b8a851a68d1c4fac (patch) | |
tree | 7f6210a19479b5b4655b2cfe6d565d43c248190e | |
parent | 4973892ae9736cd3b734c814a9549ff80d9a04f5 (diff) | |
download | vim-432e1a1b10853ce403801028b8a851a68d1c4fac.tar.gz |
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)
-rw-r--r-- | src/screen.c | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c index 40d48ee2..2c87e9b9 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; diff --git a/src/version.c b/src/version.c index a66bacbf..e2e3085e 100644 --- a/src/version.c +++ b/src/version.c @@ -710,6 +710,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 292, +/**/ 291, /**/ 290, |