diff src/edit.c @ 818:1f929f3ca806 v7.0c03

updated for version 7.0c03
author vimboss
date Wed, 29 Mar 2006 21:18:24 +0000
parents 4a79d6d376f0
children 23f82b5d2814
line wrap: on
line diff
--- a/src/edit.c
+++ b/src/edit.c
@@ -4497,6 +4497,8 @@ ins_complete(c)
 	    if (compl_col >= (colnr_T)startcol)
 		return FAIL;
 	    spell_expand_check_cap(compl_col);
+	    /* Need to obtain "line" again, it may have become invalid. */
+	    line = ml_get(curwin->w_cursor.lnum);
 	    compl_length = (int)curs_col - compl_col;
 	    compl_pattern = vim_strnsave(line + compl_col, compl_length);
 	    if (compl_pattern == NULL)