summaryrefslogtreecommitdiffstats
path: root/patches/source/vim/patches/7.4.108
blob: 054234746fd651c684fa8d76642ff89072ea03a4 (plain) (blame)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
To: vim_dev@googlegroups.com
Subject: Patch 7.4.108
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.4.108
Problem:    "zG" and "zW" leave temp files around on MS-Windows.
Solution:   Delete the temp files when exiting. (Ken Takata)
Files:	    src/memline.c, src/proto/spell.pro, src/spell.c


*** ../vim-7.4.107/src/memline.c	2013-11-04 02:53:46.000000000 +0100
--- src/memline.c	2013-11-28 17:27:06.000000000 +0100
***************
*** 841,848 ****
      for (buf = firstbuf; buf != NULL; buf = buf->b_next)
  	ml_close(buf, del_file && ((buf->b_flags & BF_PRESERVED) == 0
  				 || vim_strchr(p_cpo, CPO_PRESERVE) == NULL));
  #ifdef TEMPDIRNAMES
!     vim_deltempdir();	    /* delete created temp directory */
  #endif
  }
  
--- 841,851 ----
      for (buf = firstbuf; buf != NULL; buf = buf->b_next)
  	ml_close(buf, del_file && ((buf->b_flags & BF_PRESERVED) == 0
  				 || vim_strchr(p_cpo, CPO_PRESERVE) == NULL));
+ #ifdef FEAT_SPELL
+     spell_delete_wordlist();	/* delete the internal wordlist */
+ #endif
  #ifdef TEMPDIRNAMES
!     vim_deltempdir();		/* delete created temp directory */
  #endif
  }
  
*** ../vim-7.4.107/src/proto/spell.pro	2013-08-10 13:37:26.000000000 +0200
--- src/proto/spell.pro	2013-11-28 17:25:59.000000000 +0100
***************
*** 3,8 ****
--- 3,9 ----
  int spell_move_to __ARGS((win_T *wp, int dir, int allwords, int curline, hlf_T *attrp));
  void spell_cat_line __ARGS((char_u *buf, char_u *line, int maxlen));
  char_u *did_set_spelllang __ARGS((win_T *wp));
+ void spell_delete_wordlist __ARGS((void));
  void spell_free_all __ARGS((void));
  void spell_reload __ARGS((void));
  int spell_check_msm __ARGS((void));
*** ../vim-7.4.107/src/spell.c	2013-11-21 17:42:26.000000000 +0100
--- src/spell.c	2013-11-28 17:25:59.000000000 +0100
***************
*** 2180,2188 ****
      char_u	*endp;
      hlf_T	attr;
      int		len;
! # ifdef FEAT_SYN_HL
      int		has_syntax = syntax_present(wp);
! # endif
      int		col;
      int		can_spell;
      char_u	*buf = NULL;
--- 2180,2188 ----
      char_u	*endp;
      hlf_T	attr;
      int		len;
! #ifdef FEAT_SYN_HL
      int		has_syntax = syntax_present(wp);
! #endif
      int		col;
      int		can_spell;
      char_u	*buf = NULL;
***************
*** 2280,2286 ****
  						     : p - buf)
  						  > wp->w_cursor.col)))
  		    {
! # ifdef FEAT_SYN_HL
  			if (has_syntax)
  			{
  			    col = (int)(p - buf);
--- 2280,2286 ----
  						     : p - buf)
  						  > wp->w_cursor.col)))
  		    {
! #ifdef FEAT_SYN_HL
  			if (has_syntax)
  			{
  			    col = (int)(p - buf);
***************
*** 4701,4707 ****
      return flags;
  }
  
! # if defined(FEAT_MBYTE) || defined(EXITFREE) || defined(PROTO)
  /*
   * Free all languages.
   */
--- 4701,4725 ----
      return flags;
  }
  
! /*
!  * Delete the internal wordlist and its .spl file.
!  */
!     void
! spell_delete_wordlist()
! {
!     char_u	fname[MAXPATHL];
! 
!     if (int_wordlist != NULL)
!     {
! 	mch_remove(int_wordlist);
! 	int_wordlist_spl(fname);
! 	mch_remove(fname);
! 	vim_free(int_wordlist);
! 	int_wordlist = NULL;
!     }
! }
! 
! #if defined(FEAT_MBYTE) || defined(EXITFREE) || defined(PROTO)
  /*
   * Free all languages.
   */
***************
*** 4710,4716 ****
  {
      slang_T	*slang;
      buf_T	*buf;
-     char_u	fname[MAXPATHL];
  
      /* Go through all buffers and handle 'spelllang'. <VN> */
      for (buf = firstbuf; buf != NULL; buf = buf->b_next)
--- 4728,4733 ----
***************
*** 4723,4746 ****
  	slang_free(slang);
      }
  
!     if (int_wordlist != NULL)
!     {
! 	/* Delete the internal wordlist and its .spl file */
! 	mch_remove(int_wordlist);
! 	int_wordlist_spl(fname);
! 	mch_remove(fname);
! 	vim_free(int_wordlist);
! 	int_wordlist = NULL;
!     }
  
      vim_free(repl_to);
      repl_to = NULL;
      vim_free(repl_from);
      repl_from = NULL;
  }
! # endif
  
! # if defined(FEAT_MBYTE) || defined(PROTO)
  /*
   * Clear all spelling tables and reload them.
   * Used after 'encoding' is set and when ":mkspell" was used.
--- 4740,4755 ----
  	slang_free(slang);
      }
  
!     spell_delete_wordlist();
  
      vim_free(repl_to);
      repl_to = NULL;
      vim_free(repl_from);
      repl_from = NULL;
  }
! #endif
  
! #if defined(FEAT_MBYTE) || defined(PROTO)
  /*
   * Clear all spelling tables and reload them.
   * Used after 'encoding' is set and when ":mkspell" was used.
***************
*** 4773,4779 ****
  	}
      }
  }
! # endif
  
  /*
   * Reload the spell file "fname" if it's loaded.
--- 4782,4788 ----
  	}
      }
  }
! #endif
  
  /*
   * Reload the spell file "fname" if it's loaded.
*** ../vim-7.4.107/src/version.c	2013-11-28 17:04:38.000000000 +0100
--- src/version.c	2013-11-28 17:26:31.000000000 +0100
***************
*** 740,741 ****
--- 740,743 ----
  {   /* Add new patch number below this line */
+ /**/
+     108,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
9. All your daydreaming is preoccupied with getting a faster connection to the
   net: 28.8...ISDN...cable modem...T1...T3.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///