]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.038 v7.4.038
authorBram Moolenaar <Bram@vim.org>
Wed, 25 Sep 2013 16:54:24 +0000 (18:54 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 25 Sep 2013 16:54:24 +0000 (18:54 +0200)
Problem:    Using "zw" and "zg" when 'spell' is off give a confusing error
            message. (Gary Johnson)
Solution:   Ignore the error when locating the word.  Explicitly mention what
            word was added. (Christian Brabandt)

src/normal.c
src/spell.c
src/version.c

index 4c11a2b6072d233383793ba00fac9af943f6e734..87e979d1df35c9cbf1775d574cd76d4b49c86236 100644 (file)
@@ -5246,8 +5246,12 @@ dozet:
                    {
                        pos_T   pos = curwin->w_cursor;
 
-                       /* Find bad word under the cursor. */
+                       /* Find bad word under the cursor.  When 'spell' is
+                        * off this fails and find_ident_under_cursor() is
+                        * used below. */
+                       emsg_off++;
                        len = spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL);
+                       emsg_off--;
                        if (len != 0 && curwin->w_cursor.col <= pos.col)
                            ptr = ml_get_pos(&curwin->w_cursor);
                        curwin->w_cursor = pos;
index 20344f25fedc01babebbead09598eb6db52898a9..3ee8b02ac6555c3e4fb9bf035270279e5440c983 100644 (file)
@@ -9479,7 +9479,8 @@ spell_add_word(word, len, bad, idx, undo)
                        if (undo)
                        {
                            home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
-                           smsg((char_u *)_("Word removed from %s"), NameBuff);
+                           smsg((char_u *)_("Word '%.*s' removed from %s"),
+                                                        len, word, NameBuff);
                        }
                    }
                    fseek(fd, fpos_next, SEEK_SET);
@@ -9525,7 +9526,7 @@ spell_add_word(word, len, bad, idx, undo)
            fclose(fd);
 
            home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
-           smsg((char_u *)_("Word added to %s"), NameBuff);
+           smsg((char_u *)_("Word '%.*s' added to %s"), len, word, NameBuff);
        }
     }
 
@@ -10135,7 +10136,7 @@ spell_check_sps()
 }
 
 /*
- * "z?": Find badly spelled word under or after the cursor.
+ * "z=": Find badly spelled word under or after the cursor.
  * Give suggestions for the properly spelled word.
  * In Visual mode use the highlighted word as the bad word.
  * When "count" is non-zero use that suggestion.
index 08220ef8415f25be855bd442ff9711125a014f82..c7b73329a16ac0cf93b6d8496d7ff140e060ec22 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    38,
 /**/
     37,
 /**/