diff src/normal.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 22dfcd1494e4
children d06223965468
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -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;