comparison 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
comparison
equal deleted inserted replaced
5373:4cebff334430 5374:6daa78b6b99a
5244 # endif 5244 # endif
5245 if (ptr == NULL) 5245 if (ptr == NULL)
5246 { 5246 {
5247 pos_T pos = curwin->w_cursor; 5247 pos_T pos = curwin->w_cursor;
5248 5248
5249 /* Find bad word under the cursor. */ 5249 /* Find bad word under the cursor. When 'spell' is
5250 * off this fails and find_ident_under_cursor() is
5251 * used below. */
5252 emsg_off++;
5250 len = spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL); 5253 len = spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL);
5254 emsg_off--;
5251 if (len != 0 && curwin->w_cursor.col <= pos.col) 5255 if (len != 0 && curwin->w_cursor.col <= pos.col)
5252 ptr = ml_get_pos(&curwin->w_cursor); 5256 ptr = ml_get_pos(&curwin->w_cursor);
5253 curwin->w_cursor = pos; 5257 curwin->w_cursor = pos;
5254 } 5258 }
5255 5259