summaryrefslogtreecommitdiffstats
path: root/gvim/vim-7.2/7.2.106
blob: 2c547973b4bd3ea87ba5c5d7046bb991a47167f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
To: vim-dev@vim.org
Subject: Patch 7.2.106
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.2.106
Problem:    Endless loop when using "]s" in HTML when there are no
	    misspellings. (Ingo Karkat)
Solution:   Break the search loop.  Also fix pointer alignment for systems
	    with pointers larger than int.
Files:	    src/spell.c


*** ../vim-7.2.105/src/spell.c	Tue Dec  9 22:34:02 2008
--- src/spell.c	Wed Feb 11 17:54:50 2009
***************
*** 2376,2382 ****
  
  	    /* If we are back at the starting line and there is no match then
  	     * give up. */
! 	    if (lnum == wp->w_cursor.lnum && !found_one)
  		break;
  
  	    /* Skip the characters at the start of the next line that were
--- 2376,2382 ----
  
  	    /* If we are back at the starting line and there is no match then
  	     * give up. */
! 	    if (lnum == wp->w_cursor.lnum && (!found_one || wrapped))
  		break;
  
  	    /* Skip the characters at the start of the next line that were
***************
*** 4956,4968 ****
   * Structure that is used to store the items in the word tree.  This avoids
   * the need to keep track of each allocated thing, everything is freed all at
   * once after ":mkspell" is done.
   */
  #define  SBLOCKSIZE 16000	/* size of sb_data */
  typedef struct sblock_S sblock_T;
  struct sblock_S
  {
-     sblock_T	*sb_next;	/* next block in list */
      int		sb_used;	/* nr of bytes already in use */
      char_u	sb_data[1];	/* data, actually longer */
  };
  
--- 4956,4971 ----
   * Structure that is used to store the items in the word tree.  This avoids
   * the need to keep track of each allocated thing, everything is freed all at
   * once after ":mkspell" is done.
+  * Note: "sb_next" must be just before "sb_data" to make sure the alignment of
+  * "sb_data" is correct for systems where pointers must be aligned on
+  * pointer-size boundaries and sizeof(pointer) > sizeof(int) (e.g., Sparc).
   */
  #define  SBLOCKSIZE 16000	/* size of sb_data */
  typedef struct sblock_S sblock_T;
  struct sblock_S
  {
      int		sb_used;	/* nr of bytes already in use */
+     sblock_T	*sb_next;	/* next block in list */
      char_u	sb_data[1];	/* data, actually longer */
  };
  
***************
*** 15011,15017 ****
  
  	case 0:
  	    /*
! 	     * Lenghts are equal, thus changes must result in same length: An
  	     * insert is only possible in combination with a delete.
  	     * 1: check if for identical strings
  	     */
--- 15014,15020 ----
  
  	case 0:
  	    /*
! 	     * Lengths are equal, thus changes must result in same length: An
  	     * insert is only possible in combination with a delete.
  	     * 1: check if for identical strings
  	     */
*** ../vim-7.2.105/src/version.c	Wed Feb 11 16:45:56 2009
--- src/version.c	Wed Feb 11 17:56:34 2009
***************
*** 678,679 ****
--- 678,681 ----
  {   /* Add new patch number below this line */
+ /**/
+     106,
  /**/

-- 
If bankers can count, how come they have eight windows and
only four tellers?

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///