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)
diff --git a/src/normal.c b/src/normal.c
index 4c11a2b..87e979d 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -5246,8 +5246,12 @@
{
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;