0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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)
This commit is contained in:
Bram Moolenaar
2013-09-25 18:54:24 +02:00
parent f211884fa1
commit 134bf07ca0
3 changed files with 11 additions and 4 deletions

View 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;