]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.025 v7.4.025
authorBram Moolenaar <Bram@vim.org>
Sun, 8 Sep 2013 14:03:45 +0000 (16:03 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 8 Sep 2013 14:03:45 +0000 (16:03 +0200)
Problem:    Reading before start of a string.
Solution:   Do not call mb_ptr_back() at start of a string. (Dominique Pelle)

src/edit.c
src/version.c

index 98737ece65ae4cf4d0c5c4697ad9a9203fa2da3c..b2b778729324b75922e201dab10354e28824e376 100644 (file)
@@ -5187,11 +5187,13 @@ ins_complete(c)
 
            /* Go back to just before the first filename character. */
            mb_ptr_back(line, p);
-           while (vim_isfilec(PTR2CHAR(p)) && p >= line)
+           while (p > line && vim_isfilec(PTR2CHAR(p)))
                mb_ptr_back(line, p);
-           startcol = (int)(p - line);
+           startcol = (int)(p - line) + 1;
+           if (p == line && vim_isfilec(PTR2CHAR(p)))
+               startcol = 0;
 
-           compl_col += ++startcol;
+           compl_col += startcol;
            compl_length = (int)curs_col - startcol;
            compl_pattern = addstar(line + compl_col, compl_length,
                                                                EXPAND_FILES);
index 9731f70c79a6b5219daa56e88e6d352c0ab44d7b..ff4e3bb6fc5b67a42526c4bb0887f02b30306d9a 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    25,
 /**/
     24,
 /**/