updated for version 7.0-186
diff --git a/src/search.c b/src/search.c
index de99f2c..f38b626 100644
--- a/src/search.c
+++ b/src/search.c
@@ -812,7 +812,11 @@
 #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