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