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