]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-290 v7.1.290
authorBram Moolenaar <Bram@vim.org>
Tue, 1 Apr 2008 15:14:36 +0000 (15:14 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 1 Apr 2008 15:14:36 +0000 (15:14 +0000)
src/spell.c
src/version.c

index f45be18c2d44ac1b7cf453a502b8d63ef1dfb6d5..567c6cd363b81b06cb56ceced9dd3b4c9cbc2047 100644 (file)
@@ -2268,6 +2268,8 @@ spell_move_to(wp, dir, allwords, curline, attrp)
 /*
  * For spell checking: concatenate the start of the following line "line" into
  * "buf", blanking-out special characters.  Copy less then "maxlen" bytes.
+ * Keep the blanks at the start of the next line, this is used in win_line()
+ * to skip those bytes if the word was OK.
  */
     void
 spell_cat_line(buf, line, maxlen)
@@ -2284,12 +2286,14 @@ spell_cat_line(buf, line, maxlen)
 
     if (*p != NUL)
     {
-       *buf = ' ';
-       vim_strncpy(buf + 1, line, maxlen - 2);
-       n = (int)(p - line);
-       if (n >= maxlen)
-           n = maxlen - 1;
-       vim_memset(buf + 1, ' ', n);
+       /* Only worth concatenating if there is something else than spaces to
+        * concatenate. */
+       n = (int)(p - line) + 1;
+       if (n < maxlen - 1)
+       {
+           vim_memset(buf, ' ', n);
+           vim_strncpy(buf +  n, p, maxlen - 1 - n);
+       }
     }
 }
 
index f8579033b7f13591277be4caa3f8d7a9aca4378c..5a3c77d65e6c84bc6830d0fc4f993593f508fa23 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    290,
 /**/
     289,
 /**/