Blame SOURCES/7.4.038

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.038
22c937
Fcc: outbox
22c937
From: Bram Moolenaar <Bram@moolenaar.net>
22c937
Mime-Version: 1.0
22c937
Content-Type: text/plain; charset=UTF-8
22c937
Content-Transfer-Encoding: 8bit
22c937
------------
22c937
22c937
Patch 7.4.038
22c937
Problem:    Using "zw" and "zg" when 'spell' is off give a confusing error
22c937
	    message. (Gary Johnson)
22c937
Solution:   Ignore the error when locating the word.  Explicitly mention what
22c937
	    word was added. (Christian Brabandt)
22c937
Files:	    src/normal.c, src/spell.c
22c937
22c937
22c937
*** ../vim-7.4.037/src/normal.c	2013-09-22 15:23:38.000000000 +0200
22c937
--- src/normal.c	2013-09-25 18:54:08.000000000 +0200
22c937
***************
22c937
*** 5246,5253 ****
22c937
  		    {
22c937
  			pos_T	pos = curwin->w_cursor;
22c937
  
22c937
! 			/* Find bad word under the cursor. */
22c937
  			len = spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL);
22c937
  			if (len != 0 && curwin->w_cursor.col <= pos.col)
22c937
  			    ptr = ml_get_pos(&curwin->w_cursor);
22c937
  			curwin->w_cursor = pos;
22c937
--- 5246,5257 ----
22c937
  		    {
22c937
  			pos_T	pos = curwin->w_cursor;
22c937
  
22c937
! 			/* Find bad word under the cursor.  When 'spell' is
22c937
! 			 * off this fails and find_ident_under_cursor() is
22c937
! 			 * used below. */
22c937
! 			emsg_off++;
22c937
  			len = spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL);
22c937
+ 			emsg_off--;
22c937
  			if (len != 0 && curwin->w_cursor.col <= pos.col)
22c937
  			    ptr = ml_get_pos(&curwin->w_cursor);
22c937
  			curwin->w_cursor = pos;
22c937
*** ../vim-7.4.037/src/spell.c	2013-07-17 17:28:28.000000000 +0200
22c937
--- src/spell.c	2013-09-25 18:48:55.000000000 +0200
22c937
***************
22c937
*** 9479,9485 ****
22c937
  			if (undo)
22c937
  			{
22c937
  			    home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
22c937
! 			    smsg((char_u *)_("Word removed from %s"), NameBuff);
22c937
  			}
22c937
  		    }
22c937
  		    fseek(fd, fpos_next, SEEK_SET);
22c937
--- 9479,9486 ----
22c937
  			if (undo)
22c937
  			{
22c937
  			    home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
22c937
! 			    smsg((char_u *)_("Word '%.*s' removed from %s"),
22c937
! 							 len, word, NameBuff);
22c937
  			}
22c937
  		    }
22c937
  		    fseek(fd, fpos_next, SEEK_SET);
22c937
***************
22c937
*** 9525,9531 ****
22c937
  	    fclose(fd);
22c937
  
22c937
  	    home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
22c937
! 	    smsg((char_u *)_("Word added to %s"), NameBuff);
22c937
  	}
22c937
      }
22c937
  
22c937
--- 9526,9532 ----
22c937
  	    fclose(fd);
22c937
  
22c937
  	    home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
22c937
! 	    smsg((char_u *)_("Word '%.*s' added to %s"), len, word, NameBuff);
22c937
  	}
22c937
      }
22c937
  
22c937
***************
22c937
*** 10135,10141 ****
22c937
  }
22c937
  
22c937
  /*
22c937
!  * "z?": Find badly spelled word under or after the cursor.
22c937
   * Give suggestions for the properly spelled word.
22c937
   * In Visual mode use the highlighted word as the bad word.
22c937
   * When "count" is non-zero use that suggestion.
22c937
--- 10136,10142 ----
22c937
  }
22c937
  
22c937
  /*
22c937
!  * "z=": Find badly spelled word under or after the cursor.
22c937
   * Give suggestions for the properly spelled word.
22c937
   * In Visual mode use the highlighted word as the bad word.
22c937
   * When "count" is non-zero use that suggestion.
22c937
*** ../vim-7.4.037/src/version.c	2013-09-25 18:16:34.000000000 +0200
22c937
--- src/version.c	2013-09-25 18:52:47.000000000 +0200
22c937
***************
22c937
*** 740,741 ****
22c937
--- 740,743 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     38,
22c937
  /**/
22c937
22c937
-- 
22c937
MAN:    Fetchez la vache!
22c937
GUARD:  Quoi?
22c937
MAN:    Fetchez la vache!
22c937
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
22c937
22c937
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
22c937
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
22c937
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
22c937
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///