lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
913533e
To: vim-dev@vim.org
913533e
Subject: Patch 7.2.106
913533e
Fcc: outbox
913533e
From: Bram Moolenaar <Bram@moolenaar.net>
913533e
Mime-Version: 1.0
913533e
Content-Type: text/plain; charset=ISO-8859-1
913533e
Content-Transfer-Encoding: 8bit
913533e
------------
913533e
913533e
Patch 7.2.106
913533e
Problem:    Endless loop when using "]s" in HTML when there are no
913533e
	    misspellings. (Ingo Karkat)
913533e
Solution:   Break the search loop.  Also fix pointer alignment for systems
913533e
	    with pointers larger than int.
913533e
Files:	    src/spell.c
913533e
913533e
913533e
*** ../vim-7.2.105/src/spell.c	Tue Dec  9 22:34:02 2008
913533e
--- src/spell.c	Wed Feb 11 17:54:50 2009
913533e
***************
913533e
*** 2376,2382 ****
913533e
  
913533e
  	    /* If we are back at the starting line and there is no match then
913533e
  	     * give up. */
913533e
! 	    if (lnum == wp->w_cursor.lnum && !found_one)
913533e
  		break;
913533e
  
913533e
  	    /* Skip the characters at the start of the next line that were
913533e
--- 2376,2382 ----
913533e
  
913533e
  	    /* If we are back at the starting line and there is no match then
913533e
  	     * give up. */
913533e
! 	    if (lnum == wp->w_cursor.lnum && (!found_one || wrapped))
913533e
  		break;
913533e
  
913533e
  	    /* Skip the characters at the start of the next line that were
913533e
***************
913533e
*** 4956,4968 ****
913533e
   * Structure that is used to store the items in the word tree.  This avoids
913533e
   * the need to keep track of each allocated thing, everything is freed all at
913533e
   * once after ":mkspell" is done.
913533e
   */
913533e
  #define  SBLOCKSIZE 16000	/* size of sb_data */
913533e
  typedef struct sblock_S sblock_T;
913533e
  struct sblock_S
913533e
  {
913533e
-     sblock_T	*sb_next;	/* next block in list */
913533e
      int		sb_used;	/* nr of bytes already in use */
913533e
      char_u	sb_data[1];	/* data, actually longer */
913533e
  };
913533e
  
913533e
--- 4956,4971 ----
913533e
   * Structure that is used to store the items in the word tree.  This avoids
913533e
   * the need to keep track of each allocated thing, everything is freed all at
913533e
   * once after ":mkspell" is done.
913533e
+  * Note: "sb_next" must be just before "sb_data" to make sure the alignment of
913533e
+  * "sb_data" is correct for systems where pointers must be aligned on
913533e
+  * pointer-size boundaries and sizeof(pointer) > sizeof(int) (e.g., Sparc).
913533e
   */
913533e
  #define  SBLOCKSIZE 16000	/* size of sb_data */
913533e
  typedef struct sblock_S sblock_T;
913533e
  struct sblock_S
913533e
  {
913533e
      int		sb_used;	/* nr of bytes already in use */
913533e
+     sblock_T	*sb_next;	/* next block in list */
913533e
      char_u	sb_data[1];	/* data, actually longer */
913533e
  };
913533e
  
913533e
***************
913533e
*** 15011,15017 ****
913533e
  
913533e
  	case 0:
913533e
  	    /*
913533e
! 	     * Lenghts are equal, thus changes must result in same length: An
913533e
  	     * insert is only possible in combination with a delete.
913533e
  	     * 1: check if for identical strings
913533e
  	     */
913533e
--- 15014,15020 ----
913533e
  
913533e
  	case 0:
913533e
  	    /*
913533e
! 	     * Lengths are equal, thus changes must result in same length: An
913533e
  	     * insert is only possible in combination with a delete.
913533e
  	     * 1: check if for identical strings
913533e
  	     */
913533e
*** ../vim-7.2.105/src/version.c	Wed Feb 11 16:45:56 2009
913533e
--- src/version.c	Wed Feb 11 17:56:34 2009
913533e
***************
913533e
*** 678,679 ****
913533e
--- 678,681 ----
913533e
  {   /* Add new patch number below this line */
913533e
+ /**/
913533e
+     106,
913533e
  /**/
913533e
913533e
-- 
913533e
If bankers can count, how come they have eight windows and
913533e
only four tellers?
913533e
913533e
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
913533e
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
913533e
\\\        download, build and distribute -- http://www.A-A-P.org        ///
913533e
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///