Mercurial > vim
changeset 1060:39d115408c71 v7.0.186
updated for version 7.0-186
author | vimboss |
---|---|
date | Tue, 16 Jan 2007 15:01:41 +0000 |
parents | b8c880d61acb |
children | b4d11ddb7303 |
files | src/search.c src/version.c |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/search.c +++ b/src/search.c @@ -812,7 +812,11 @@ searchit(win, buf, pos, dir, pat, count, #ifdef FEAT_MBYTE if (has_mbyte) { - ptr = ml_get_buf(buf, pos->lnum, FALSE); + /* 'e' offset may put us just below the last line */ + if (pos->lnum > buf->b_ml.ml_line_count) + ptr = ""; + else + ptr = ml_get_buf(buf, pos->lnum, FALSE); pos->col -= (*mb_head_off)(ptr, ptr + pos->col); } #endif