jkunstle / rpms / vim

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