]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-051 v7.1.051
authorBram Moolenaar <Bram@vim.org>
Sun, 5 Aug 2007 16:33:12 +0000 (16:33 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 5 Aug 2007 16:33:12 +0000 (16:33 +0000)
src/spell.c
src/version.c

index a4c681172793680c132600d82f6ddda1e5ecd603..ce887f7493ed1e431158600883dd40eaca649e2f 100644 (file)
@@ -12182,7 +12182,9 @@ suggest_trie_walk(su, lp, fword, soundfold)
            {
                n = mb_cptr2len(p);
                c = mb_ptr2char(p);
-               if (!soundfold && !spell_iswordp(p + n, curbuf))
+               if (p[n] == NUL)
+                   c2 = NUL;
+               else if (!soundfold && !spell_iswordp(p + n, curbuf))
                    c2 = c; /* don't swap non-word char */
                else
                    c2 = mb_ptr2char(p + n);
@@ -12190,12 +12192,21 @@ suggest_trie_walk(su, lp, fword, soundfold)
            else
 #endif
            {
-               if (!soundfold && !spell_iswordp(p + 1, curbuf))
+               if (p[1] == NUL)
+                   c2 = NUL;
+               else if (!soundfold && !spell_iswordp(p + 1, curbuf))
                    c2 = c; /* don't swap non-word char */
                else
                    c2 = p[1];
            }
 
+           /* When the second character is NUL we can't swap. */
+           if (c2 == NUL)
+           {
+               sp->ts_state = STATE_REP_INI;
+               break;
+           }
+
            /* When characters are identical, swap won't do anything.
             * Also get here if the second char is not a word character. */
            if (c == c2)
index 95f2a4fa4e279bedfb6b9c297ea8e464a58c4393..a8edba471f97a543eb08a254ebb3edc02e9dc289 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    51,
 /**/
     50,
 /**/