comparison src/spell.c @ 5374:6daa78b6b99a v7.4.038

updated for version 7.4.038 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)
author Bram Moolenaar <bram@vim.org>
date Wed, 25 Sep 2013 18:54:24 +0200
parents 7aca84c0cd37
children 70915ede509a
comparison
equal deleted inserted replaced
5373:4cebff334430 5374:6daa78b6b99a
9477 { 9477 {
9478 fputc('#', fd); 9478 fputc('#', fd);
9479 if (undo) 9479 if (undo)
9480 { 9480 {
9481 home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE); 9481 home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
9482 smsg((char_u *)_("Word removed from %s"), NameBuff); 9482 smsg((char_u *)_("Word '%.*s' removed from %s"),
9483 len, word, NameBuff);
9483 } 9484 }
9484 } 9485 }
9485 fseek(fd, fpos_next, SEEK_SET); 9486 fseek(fd, fpos_next, SEEK_SET);
9486 } 9487 }
9487 } 9488 }
9523 else 9524 else
9524 fprintf(fd, "%.*s\n", len, word); 9525 fprintf(fd, "%.*s\n", len, word);
9525 fclose(fd); 9526 fclose(fd);
9526 9527
9527 home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE); 9528 home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
9528 smsg((char_u *)_("Word added to %s"), NameBuff); 9529 smsg((char_u *)_("Word '%.*s' added to %s"), len, word, NameBuff);
9529 } 9530 }
9530 } 9531 }
9531 9532
9532 if (fd != NULL) 9533 if (fd != NULL)
9533 { 9534 {
10133 10134
10134 return OK; 10135 return OK;
10135 } 10136 }
10136 10137
10137 /* 10138 /*
10138 * "z?": Find badly spelled word under or after the cursor. 10139 * "z=": Find badly spelled word under or after the cursor.
10139 * Give suggestions for the properly spelled word. 10140 * Give suggestions for the properly spelled word.
10140 * In Visual mode use the highlighted word as the bad word. 10141 * In Visual mode use the highlighted word as the bad word.
10141 * When "count" is non-zero use that suggestion. 10142 * When "count" is non-zero use that suggestion.
10142 */ 10143 */
10143 void 10144 void