1
0
forked from aniani/vim

updated for version 7.2.376

Problem:    ml_get error when using SiSU syntax. (Nathan Thomas)
Solution:   If the match ends below the last line move it to the end of the
            last line.
This commit is contained in:
Bram Moolenaar 2010-02-24 17:22:20 +01:00
parent 89c0ea4ea1
commit 72b73c12dc
2 changed files with 8 additions and 0 deletions

View File

@ -3086,6 +3086,12 @@ syn_add_start_off(result, regmatch, spp, idx, extra)
col = regmatch->startpos[0].col;
off = spp->sp_offsets[idx];
}
if (result->lnum > syn_buf->b_ml.ml_line_count)
{
/* a "\n" at the end of the pattern may take us below the last line */
result->lnum = syn_buf->b_ml.ml_line_count;
col = STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE));
}
if (off != 0)
{
base = ml_get_buf(syn_buf, result->lnum, FALSE);

View File

@ -681,6 +681,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
376,
/**/
375,
/**/