]> git.pld-linux.org Git - packages/vim.git/blame - 7.3.400
- new
[packages/vim.git] / 7.3.400
CommitLineData
d034a75d
AG
1To: vim_dev@googlegroups.com
2Subject: Patch 7.3.400
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.3.400
11Problem: Compiler warnings for shadowed variables.
12Solution: Remove or rename the variables.
13Files: src/charset.c, src/digraph.c, src/edit.c, src/eval.c, src/fold.c,
14 src/getchar.c, src/message.c, src/misc2.c, src/move.c,
15 src/netbeans.c, src/option.c, src/os_unix.c, src/screen.c,
16 src/search.c, src/spell.c, src/syntax.c, src/tag.c, src/window.c
17
18
19*** ../vim-7.3.399/src/charset.c 2010-08-15 21:57:25.000000000 +0200
20--- src/charset.c 2012-01-10 21:55:50.000000000 +0100
21***************
22*** 463,503 ****
23 if (enc_utf8)
24 {
25 int c = utf_ptr2char(STR_PTR(i));
26! int ol = utf_ptr2len(STR_PTR(i));
27 int lc = utf_tolower(c);
28
29 /* Only replace the character when it is not an invalid
30 * sequence (ASCII character or more than one byte) and
31 * utf_tolower() doesn't return the original character. */
32! if ((c < 0x80 || ol > 1) && c != lc)
33 {
34! int nl = utf_char2len(lc);
35
36 /* If the byte length changes need to shift the following
37 * characters forward or backward. */
38! if (ol != nl)
39 {
40! if (nl > ol)
41 {
42! if (buf == NULL ? ga_grow(&ga, nl - ol + 1) == FAIL
43! : len + nl - ol >= buflen)
44 {
45 /* out of memory, keep old char */
46 lc = c;
47! nl = ol;
48 }
49 }
50! if (ol != nl)
51 {
52 if (buf == NULL)
53 {
54! STRMOVE(GA_PTR(i) + nl, GA_PTR(i) + ol);
55! ga.ga_len += nl - ol;
56 }
57 else
58 {
59! STRMOVE(buf + i + nl, buf + i + ol);
60! len += nl - ol;
61 }
62 }
63 }
64--- 463,504 ----
65 if (enc_utf8)
66 {
67 int c = utf_ptr2char(STR_PTR(i));
68! int olen = utf_ptr2len(STR_PTR(i));
69 int lc = utf_tolower(c);
70
71 /* Only replace the character when it is not an invalid
72 * sequence (ASCII character or more than one byte) and
73 * utf_tolower() doesn't return the original character. */
74! if ((c < 0x80 || olen > 1) && c != lc)
75 {
76! int nlen = utf_char2len(lc);
77
78 /* If the byte length changes need to shift the following
79 * characters forward or backward. */
80! if (olen != nlen)
81 {
82! if (nlen > olen)
83 {
84! if (buf == NULL
85! ? ga_grow(&ga, nlen - olen + 1) == FAIL
86! : len + nlen - olen >= buflen)
87 {
88 /* out of memory, keep old char */
89 lc = c;
90! nlen = olen;
91 }
92 }
93! if (olen != nlen)
94 {
95 if (buf == NULL)
96 {
97! STRMOVE(GA_PTR(i) + nlen, GA_PTR(i) + olen);
98! ga.ga_len += nlen - olen;
99 }
100 else
101 {
102! STRMOVE(buf + i + nlen, buf + i + olen);
103! len += nlen - olen;
104 }
105 }
106 }
107*** ../vim-7.3.399/src/digraph.c 2010-08-15 21:57:28.000000000 +0200
108--- src/digraph.c 2012-01-10 21:57:16.000000000 +0100
109***************
110*** 2080,2092 ****
111 /*
112 * Lookup the pair "char1", "char2" in the digraph tables.
113 * If no match, return "char2".
114! * If "meta" is TRUE and "char1" is a space, return "char2" | 0x80.
115 */
116 static int
117! getexactdigraph(char1, char2, meta)
118 int char1;
119 int char2;
120! int meta;
121 {
122 int i;
123 int retval = 0;
124--- 2080,2092 ----
125 /*
126 * Lookup the pair "char1", "char2" in the digraph tables.
127 * If no match, return "char2".
128! * If "meta_char" is TRUE and "char1" is a space, return "char2" | 0x80.
129 */
130 static int
131! getexactdigraph(char1, char2, meta_char)
132 int char1;
133 int char2;
134! int meta_char;
135 {
136 int i;
137 int retval = 0;
138***************
139*** 2159,2165 ****
140
141 if (retval == 0) /* digraph deleted or not found */
142 {
143! if (char1 == ' ' && meta) /* <space> <char> --> meta-char */
144 return (char2 | 0x80);
145 return char2;
146 }
147--- 2159,2165 ----
148
149 if (retval == 0) /* digraph deleted or not found */
150 {
151! if (char1 == ' ' && meta_char) /* <space> <char> --> meta-char */
152 return (char2 | 0x80);
153 return char2;
154 }
155***************
156*** 2171,2186 ****
157 * Allow for both char1-char2 and char2-char1
158 */
159 int
160! getdigraph(char1, char2, meta)
161 int char1;
162 int char2;
163! int meta;
164 {
165 int retval;
166
167! if (((retval = getexactdigraph(char1, char2, meta)) == char2)
168 && (char1 != char2)
169! && ((retval = getexactdigraph(char2, char1, meta)) == char1))
170 return char2;
171 return retval;
172 }
173--- 2171,2186 ----
174 * Allow for both char1-char2 and char2-char1
175 */
176 int
177! getdigraph(char1, char2, meta_char)
178 int char1;
179 int char2;
180! int meta_char;
181 {
182 int retval;
183
184! if (((retval = getexactdigraph(char1, char2, meta_char)) == char2)
185 && (char1 != char2)
186! && ((retval = getexactdigraph(char2, char1, meta_char)) == char1))
187 return char2;
188 return retval;
189 }
190*** ../vim-7.3.399/src/edit.c 2011-12-23 13:14:58.000000000 +0100
191--- src/edit.c 2012-01-10 21:58:28.000000000 +0100
192***************
193*** 4003,4026 ****
194 ins_compl_add_dict(dict)
195 dict_T *dict;
196 {
197! dictitem_T *refresh;
198! dictitem_T *words;
199
200 /* Check for optional "refresh" item. */
201 compl_opt_refresh_always = FALSE;
202! refresh = dict_find(dict, (char_u *)"refresh", 7);
203! if (refresh != NULL && refresh->di_tv.v_type == VAR_STRING)
204 {
205! char_u *v = refresh->di_tv.vval.v_string;
206
207 if (v != NULL && STRCMP(v, (char_u *)"always") == 0)
208 compl_opt_refresh_always = TRUE;
209 }
210
211 /* Add completions from a "words" list. */
212! words = dict_find(dict, (char_u *)"words", 5);
213! if (words != NULL && words->di_tv.v_type == VAR_LIST)
214! ins_compl_add_list(words->di_tv.vval.v_list);
215 }
216
217 /*
218--- 4003,4026 ----
219 ins_compl_add_dict(dict)
220 dict_T *dict;
221 {
222! dictitem_T *di_refresh;
223! dictitem_T *di_words;
224
225 /* Check for optional "refresh" item. */
226 compl_opt_refresh_always = FALSE;
227! di_refresh = dict_find(dict, (char_u *)"refresh", 7);
228! if (di_refresh != NULL && di_refresh->di_tv.v_type == VAR_STRING)
229 {
230! char_u *v = di_refresh->di_tv.vval.v_string;
231
232 if (v != NULL && STRCMP(v, (char_u *)"always") == 0)
233 compl_opt_refresh_always = TRUE;
234 }
235
236 /* Add completions from a "words" list. */
237! di_words = dict_find(dict, (char_u *)"words", 5);
238! if (di_words != NULL && di_words->di_tv.v_type == VAR_LIST)
239! ins_compl_add_list(di_words->di_tv.vval.v_list);
240 }
241
242 /*
243*** ../vim-7.3.399/src/eval.c 2012-01-04 14:35:31.000000000 +0100
244--- src/eval.c 2012-01-10 22:00:50.000000000 +0100
245***************
246*** 6573,6587 ****
247
248 /*
249 * Join list "l" into a string in "*gap", using separator "sep".
250! * When "echo" is TRUE use String as echoed, otherwise as inside a List.
251 * Return FAIL or OK.
252 */
253 static int
254! list_join(gap, l, sep, echo, copyID)
255 garray_T *gap;
256 list_T *l;
257 char_u *sep;
258! int echo;
259 int copyID;
260 {
261 int first = TRUE;
262--- 6573,6587 ----
263
264 /*
265 * Join list "l" into a string in "*gap", using separator "sep".
266! * When "echo_style" is TRUE use String as echoed, otherwise as inside a List.
267 * Return FAIL or OK.
268 */
269 static int
270! list_join(gap, l, sep, echo_style, copyID)
271 garray_T *gap;
272 list_T *l;
273 char_u *sep;
274! int echo_style;
275 int copyID;
276 {
277 int first = TRUE;
278***************
279*** 6597,6603 ****
280 else
281 ga_concat(gap, sep);
282
283! if (echo)
284 s = echo_string(&item->li_tv, &tofree, numbuf, copyID);
285 else
286 s = tv2string(&item->li_tv, &tofree, numbuf, copyID);
287--- 6597,6603 ----
288 else
289 ga_concat(gap, sep);
290
291! if (echo_style)
292 s = echo_string(&item->li_tv, &tofree, numbuf, copyID);
293 else
294 s = tv2string(&item->li_tv, &tofree, numbuf, copyID);
295***************
296*** 17893,17899 ****
297 typval_T *argvars;
298 typval_T *rettv;
299 {
300! char_u *instr;
301 char_u *fromstr;
302 char_u *tostr;
303 char_u *p;
304--- 17893,17899 ----
305 typval_T *argvars;
306 typval_T *rettv;
307 {
308! char_u *in_str;
309 char_u *fromstr;
310 char_u *tostr;
311 char_u *p;
312***************
313*** 17910,17916 ****
314 char_u buf2[NUMBUFLEN];
315 garray_T ga;
316
317! instr = get_tv_string(&argvars[0]);
318 fromstr = get_tv_string_buf_chk(&argvars[1], buf);
319 tostr = get_tv_string_buf_chk(&argvars[2], buf2);
320
321--- 17910,17916 ----
322 char_u buf2[NUMBUFLEN];
323 garray_T ga;
324
325! in_str = get_tv_string(&argvars[0]);
326 fromstr = get_tv_string_buf_chk(&argvars[1], buf);
327 tostr = get_tv_string_buf_chk(&argvars[2], buf2);
328
329***************
330*** 17936,17954 ****
331 }
332
333 /* fromstr and tostr have to contain the same number of chars */
334! while (*instr != NUL)
335 {
336 #ifdef FEAT_MBYTE
337 if (has_mbyte)
338 {
339! inlen = (*mb_ptr2len)(instr);
340! cpstr = instr;
341 cplen = inlen;
342 idx = 0;
343 for (p = fromstr; *p != NUL; p += fromlen)
344 {
345 fromlen = (*mb_ptr2len)(p);
346! if (fromlen == inlen && STRNCMP(instr, p, inlen) == 0)
347 {
348 for (p = tostr; *p != NUL; p += tolen)
349 {
350--- 17936,17954 ----
351 }
352
353 /* fromstr and tostr have to contain the same number of chars */
354! while (*in_str != NUL)
355 {
356 #ifdef FEAT_MBYTE
357 if (has_mbyte)
358 {
359! inlen = (*mb_ptr2len)(in_str);
360! cpstr = in_str;
361 cplen = inlen;
362 idx = 0;
363 for (p = fromstr; *p != NUL; p += fromlen)
364 {
365 fromlen = (*mb_ptr2len)(p);
366! if (fromlen == inlen && STRNCMP(in_str, p, inlen) == 0)
367 {
368 for (p = tostr; *p != NUL; p += tolen)
369 {
370***************
371*** 17967,17977 ****
372 ++idx;
373 }
374
375! if (first && cpstr == instr)
376 {
377 /* Check that fromstr and tostr have the same number of
378 * (multi-byte) characters. Done only once when a character
379! * of instr doesn't appear in fromstr. */
380 first = FALSE;
381 for (p = tostr; *p != NUL; p += tolen)
382 {
383--- 17967,17977 ----
384 ++idx;
385 }
386
387! if (first && cpstr == in_str)
388 {
389 /* Check that fromstr and tostr have the same number of
390 * (multi-byte) characters. Done only once when a character
391! * of in_str doesn't appear in fromstr. */
392 first = FALSE;
393 for (p = tostr; *p != NUL; p += tolen)
394 {
395***************
396*** 17986,18003 ****
397 mch_memmove((char *)ga.ga_data + ga.ga_len, cpstr, (size_t)cplen);
398 ga.ga_len += cplen;
399
400! instr += inlen;
401 }
402 else
403 #endif
404 {
405 /* When not using multi-byte chars we can do it faster. */
406! p = vim_strchr(fromstr, *instr);
407 if (p != NULL)
408 ga_append(&ga, tostr[p - fromstr]);
409 else
410! ga_append(&ga, *instr);
411! ++instr;
412 }
413 }
414
415--- 17986,18003 ----
416 mch_memmove((char *)ga.ga_data + ga.ga_len, cpstr, (size_t)cplen);
417 ga.ga_len += cplen;
418
419! in_str += inlen;
420 }
421 else
422 #endif
423 {
424 /* When not using multi-byte chars we can do it faster. */
425! p = vim_strchr(fromstr, *in_str);
426 if (p != NULL)
427 ga_append(&ga, tostr[p - fromstr]);
428 else
429! ga_append(&ga, *in_str);
430! ++in_str;
431 }
432 }
433
434*** ../vim-7.3.399/src/fold.c 2011-08-26 16:12:55.000000000 +0200
435--- src/fold.c 2012-01-10 22:01:26.000000000 +0100
436***************
437*** 1033,1042 ****
438 * Init the fold info in a new window.
439 */
440 void
441! foldInitWin(newwin)
442! win_T *newwin;
443 {
444! ga_init2(&newwin->w_folds, (int)sizeof(fold_T), 10);
445 }
446
447 /* find_wl_entry() {{{2 */
448--- 1033,1042 ----
449 * Init the fold info in a new window.
450 */
451 void
452! foldInitWin(new_win)
453! win_T *new_win;
454 {
455! ga_init2(&new_win->w_folds, (int)sizeof(fold_T), 10);
456 }
457
458 /* find_wl_entry() {{{2 */
459*** ../vim-7.3.399/src/getchar.c 2011-12-23 14:54:01.000000000 +0100
460--- src/getchar.c 2012-01-10 22:02:30.000000000 +0100
461***************
462*** 418,429 ****
463
464 /*
465 * Remove the contents of the stuff buffer and the mapped characters in the
466! * typeahead buffer (used in case of an error). If 'typeahead' is true,
467 * flush all typeahead characters (used when interrupted by a CTRL-C).
468 */
469 void
470! flush_buffers(typeahead)
471! int typeahead;
472 {
473 init_typebuf();
474
475--- 418,429 ----
476
477 /*
478 * Remove the contents of the stuff buffer and the mapped characters in the
479! * typeahead buffer (used in case of an error). If "flush_typeahead" is true,
480 * flush all typeahead characters (used when interrupted by a CTRL-C).
481 */
482 void
483! flush_buffers(flush_typeahead)
484! int flush_typeahead;
485 {
486 init_typebuf();
487
488***************
489*** 431,437 ****
490 while (read_stuff(TRUE) != NUL)
491 ;
492
493! if (typeahead) /* remove all typeahead */
494 {
495 /*
496 * We have to get all characters, because we may delete the first part
497--- 431,437 ----
498 while (read_stuff(TRUE) != NUL)
499 ;
500
501! if (flush_typeahead) /* remove all typeahead */
502 {
503 /*
504 * We have to get all characters, because we may delete the first part
505*** ../vim-7.3.399/src/message.c 2011-12-30 14:14:16.000000000 +0100
506--- src/message.c 2012-01-10 22:03:56.000000000 +0100
507***************
508*** 2487,2493 ****
509 #ifdef FEAT_CON_DIALOG
510 int retval = FALSE;
511 #endif
512! int scroll;
513 msgchunk_T *mp_last = NULL;
514 msgchunk_T *mp;
515 int i;
516--- 2487,2493 ----
517 #ifdef FEAT_CON_DIALOG
518 int retval = FALSE;
519 #endif
520! int toscroll;
521 msgchunk_T *mp_last = NULL;
522 msgchunk_T *mp;
523 int i;
524***************
525*** 2538,2586 ****
526 }
527 #endif
528
529! scroll = 0;
530 switch (c)
531 {
532 case BS: /* scroll one line back */
533 case K_BS:
534 case 'k':
535 case K_UP:
536! scroll = -1;
537 break;
538
539 case CAR: /* one extra line */
540 case NL:
541 case 'j':
542 case K_DOWN:
543! scroll = 1;
544 break;
545
546 case 'u': /* Up half a page */
547! scroll = -(Rows / 2);
548 break;
549
550 case 'd': /* Down half a page */
551! scroll = Rows / 2;
552 break;
553
554 case 'b': /* one page back */
555 case K_PAGEUP:
556! scroll = -(Rows - 1);
557 break;
558
559 case ' ': /* one extra page */
560 case 'f':
561 case K_PAGEDOWN:
562 case K_LEFTMOUSE:
563! scroll = Rows - 1;
564 break;
565
566 case 'g': /* all the way back to the start */
567! scroll = -999999;
568 break;
569
570 case 'G': /* all the way to the end */
571! scroll = 999999;
572 lines_left = 999999;
573 break;
574
575--- 2538,2586 ----
576 }
577 #endif
578
579! toscroll = 0;
580 switch (c)
581 {
582 case BS: /* scroll one line back */
583 case K_BS:
584 case 'k':
585 case K_UP:
586! toscroll = -1;
587 break;
588
589 case CAR: /* one extra line */
590 case NL:
591 case 'j':
592 case K_DOWN:
593! toscroll = 1;
594 break;
595
596 case 'u': /* Up half a page */
597! toscroll = -(Rows / 2);
598 break;
599
600 case 'd': /* Down half a page */
601! toscroll = Rows / 2;
602 break;
603
604 case 'b': /* one page back */
605 case K_PAGEUP:
606! toscroll = -(Rows - 1);
607 break;
608
609 case ' ': /* one extra page */
610 case 'f':
611 case K_PAGEDOWN:
612 case K_LEFTMOUSE:
613! toscroll = Rows - 1;
614 break;
615
616 case 'g': /* all the way back to the start */
617! toscroll = -999999;
618 break;
619
620 case 'G': /* all the way to the end */
621! toscroll = 999999;
622 lines_left = 999999;
623 break;
624
625***************
626*** 2633,2641 ****
627 continue;
628 }
629
630! if (scroll != 0)
631 {
632! if (scroll < 0)
633 {
634 /* go to start of last line */
635 if (mp_last == NULL)
636--- 2633,2641 ----
637 continue;
638 }
639
640! if (toscroll != 0)
641 {
642! if (toscroll < 0)
643 {
644 /* go to start of last line */
645 if (mp_last == NULL)
646***************
647*** 2653,2659 ****
648 if (mp != NULL && mp->sb_prev != NULL)
649 {
650 /* Find line to be displayed at top. */
651! for (i = 0; i > scroll; --i)
652 {
653 if (mp == NULL || mp->sb_prev == NULL)
654 break;
655--- 2653,2659 ----
656 if (mp != NULL && mp->sb_prev != NULL)
657 {
658 /* Find line to be displayed at top. */
659! for (i = 0; i > toscroll; --i)
660 {
661 if (mp == NULL || mp->sb_prev == NULL)
662 break;
663***************
664*** 2664,2670 ****
665 mp_last = msg_sb_start(mp_last->sb_prev);
666 }
667
668! if (scroll == -1 && screen_ins_lines(0, 0, 1,
669 (int)Rows, NULL) == OK)
670 {
671 /* display line at top */
672--- 2664,2670 ----
673 mp_last = msg_sb_start(mp_last->sb_prev);
674 }
675
676! if (toscroll == -1 && screen_ins_lines(0, 0, 1,
677 (int)Rows, NULL) == OK)
678 {
679 /* display line at top */
680***************
681*** 2680,2692 ****
682 ++msg_scrolled;
683 }
684 }
685! scroll = 0;
686 }
687 }
688 else
689 {
690 /* First display any text that we scrolled back. */
691! while (scroll > 0 && mp_last != NULL)
692 {
693 /* scroll up, display line at bottom */
694 msg_scroll_up();
695--- 2680,2692 ----
696 ++msg_scrolled;
697 }
698 }
699! toscroll = 0;
700 }
701 }
702 else
703 {
704 /* First display any text that we scrolled back. */
705! while (toscroll > 0 && mp_last != NULL)
706 {
707 /* scroll up, display line at bottom */
708 msg_scroll_up();
709***************
710*** 2694,2704 ****
711 screen_fill((int)Rows - 2, (int)Rows - 1, 0,
712 (int)Columns, ' ', ' ', 0);
713 mp_last = disp_sb_line((int)Rows - 2, mp_last);
714! --scroll;
715 }
716 }
717
718! if (scroll <= 0)
719 {
720 /* displayed the requested text, more prompt again */
721 screen_fill((int)Rows - 1, (int)Rows, 0,
722--- 2694,2704 ----
723 screen_fill((int)Rows - 2, (int)Rows - 1, 0,
724 (int)Columns, ' ', ' ', 0);
725 mp_last = disp_sb_line((int)Rows - 2, mp_last);
726! --toscroll;
727 }
728 }
729
730! if (toscroll <= 0)
731 {
732 /* displayed the requested text, more prompt again */
733 screen_fill((int)Rows - 1, (int)Rows, 0,
734***************
735*** 2708,2714 ****
736 }
737
738 /* display more text, return to caller */
739! lines_left = scroll;
740 }
741
742 break;
743--- 2708,2714 ----
744 }
745
746 /* display more text, return to caller */
747! lines_left = toscroll;
748 }
749
750 break;
751*** ../vim-7.3.399/src/misc2.c 2012-01-10 16:28:41.000000000 +0100
752--- src/misc2.c 2012-01-10 22:04:25.000000000 +0100
753***************
754*** 1559,1565 ****
755 if (enc_utf8)
756 {
757 int c, uc;
758! int nl;
759 char_u *s;
760
761 c = utf_ptr2char(p);
762--- 1559,1565 ----
763 if (enc_utf8)
764 {
765 int c, uc;
766! int newl;
767 char_u *s;
768
769 c = utf_ptr2char(p);
770***************
771*** 1568,1588 ****
772 /* Reallocate string when byte count changes. This is rare,
773 * thus it's OK to do another malloc()/free(). */
774 l = utf_ptr2len(p);
775! nl = utf_char2len(uc);
776! if (nl != l)
777 {
778! s = alloc((unsigned)STRLEN(res) + 1 + nl - l);
779 if (s == NULL)
780 break;
781 mch_memmove(s, res, p - res);
782! STRCPY(s + (p - res) + nl, p + l);
783 p = s + (p - res);
784 vim_free(res);
785 res = s;
786 }
787
788 utf_char2bytes(uc, p);
789! p += nl;
790 }
791 else if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
792 p += l; /* skip multi-byte character */
793--- 1568,1588 ----
794 /* Reallocate string when byte count changes. This is rare,
795 * thus it's OK to do another malloc()/free(). */
796 l = utf_ptr2len(p);
797! newl = utf_char2len(uc);
798! if (newl != l)
799 {
800! s = alloc((unsigned)STRLEN(res) + 1 + newl - l);
801 if (s == NULL)
802 break;
803 mch_memmove(s, res, p - res);
804! STRCPY(s + (p - res) + newl, p + l);
805 p = s + (p - res);
806 vim_free(res);
807 res = s;
808 }
809
810 utf_char2bytes(uc, p);
811! p += newl;
812 }
813 else if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
814 p += l; /* skip multi-byte character */
815*** ../vim-7.3.399/src/move.c 2011-02-01 18:01:06.000000000 +0100
816--- src/move.c 2012-01-10 22:05:22.000000000 +0100
817***************
818*** 926,933 ****
819 * Also updates curwin->w_leftcol.
820 */
821 void
822! curs_columns(scroll)
823! int scroll; /* when TRUE, may scroll horizontally */
824 {
825 int diff;
826 int extra; /* offset for first screen line */
827--- 926,933 ----
828 * Also updates curwin->w_leftcol.
829 */
830 void
831! curs_columns(may_scroll)
832! int may_scroll; /* when TRUE, may scroll horizontally */
833 {
834 int diff;
835 int extra; /* offset for first screen line */
836***************
837*** 1014,1020 ****
838 /* No line wrapping: compute curwin->w_leftcol if scrolling is on and line
839 * is not folded.
840 * If scrolling is off, curwin->w_leftcol is assumed to be 0 */
841! else if (scroll
842 #ifdef FEAT_FOLDING
843 && !curwin->w_cline_folded
844 #endif
845--- 1014,1020 ----
846 /* No line wrapping: compute curwin->w_leftcol if scrolling is on and line
847 * is not folded.
848 * If scrolling is off, curwin->w_leftcol is assumed to be 0 */
849! else if (may_scroll
850 #ifdef FEAT_FOLDING
851 && !curwin->w_cline_folded
852 #endif
853*** ../vim-7.3.399/src/netbeans.c 2011-10-20 21:58:20.000000000 +0200
854--- src/netbeans.c 2012-01-10 22:16:26.000000000 +0100
855***************
856*** 1395,1401 ****
857 int cmdno,
858 char_u *args) /* points to space before arguments or NUL */
859 {
860! int doupdate = 0;
861 long off = 0;
862 nbbuf_T *buf = nb_get_buf(bufno);
863 static int skip = 0;
864--- 1395,1401 ----
865 int cmdno,
866 char_u *args) /* points to space before arguments or NUL */
867 {
868! int do_update = 0;
869 long off = 0;
870 nbbuf_T *buf = nb_get_buf(bufno);
871 static int skip = 0;
872***************
873*** 1600,1606 ****
874 last.lnum, last.col));
875 del_from_lnum = first.lnum;
876 del_to_lnum = last.lnum;
877! doupdate = 1;
878
879 /* Get the position of the first byte after the deleted
880 * section. "next" is NULL when deleting to the end of the
881--- 1600,1606 ----
882 last.lnum, last.col));
883 del_from_lnum = first.lnum;
884 del_to_lnum = last.lnum;
885! do_update = 1;
886
887 /* Get the position of the first byte after the deleted
888 * section. "next" is NULL when deleting to the end of the
889***************
890*** 1777,1783 ****
891 lnum = lnum_start;
892
893 /* Loop over the "\n" separated lines of the argument. */
894! doupdate = 1;
895 while (*args != NUL)
896 {
897 nl = vim_strchr(args, '\n');
898--- 1777,1783 ----
899 lnum = lnum_start;
900
901 /* Loop over the "\n" separated lines of the argument. */
902! do_update = 1;
903 while (*args != NUL)
904 {
905 nl = vim_strchr(args, '\n');
906***************
907*** 1992,1998 ****
908 EMSG("E640: invalid buffer identifier in initDone");
909 return FAIL;
910 }
911! doupdate = 1;
912 buf->initDone = TRUE;
913 nb_set_curbuf(buf->bufp);
914 #if defined(FEAT_AUTOCMD)
915--- 1992,1998 ----
916 EMSG("E640: invalid buffer identifier in initDone");
917 return FAIL;
918 }
919! do_update = 1;
920 buf->initDone = TRUE;
921 nb_set_curbuf(buf->bufp);
922 #if defined(FEAT_AUTOCMD)
923***************
924*** 2081,2087 ****
925 ECMD_HIDE + ECMD_OLDBUF, curwin);
926 buf->bufp = curbuf;
927 buf->initDone = TRUE;
928! doupdate = 1;
929 #if defined(FEAT_TITLE)
930 maketitle();
931 #endif
932--- 2081,2087 ----
933 ECMD_HIDE + ECMD_OLDBUF, curwin);
934 buf->bufp = curbuf;
935 buf->initDone = TRUE;
936! do_update = 1;
937 #if defined(FEAT_TITLE)
938 maketitle();
939 #endif
940***************
941*** 2109,2115 ****
942 exarg.forceit = FALSE;
943 dosetvisible = TRUE;
944 goto_buffer(&exarg, DOBUF_FIRST, FORWARD, buf->bufp->b_fnum);
945! doupdate = 1;
946 dosetvisible = FALSE;
947
948 #ifdef FEAT_GUI
949--- 2109,2115 ----
950 exarg.forceit = FALSE;
951 dosetvisible = TRUE;
952 goto_buffer(&exarg, DOBUF_FIRST, FORWARD, buf->bufp->b_fnum);
953! do_update = 1;
954 dosetvisible = FALSE;
955
956 #ifdef FEAT_GUI
957***************
958*** 2309,2315 ****
959 buf->bufp->b_fnum, TRUE);
960 buf->bufp = NULL;
961 buf->initDone = FALSE;
962! doupdate = 1;
963 /* =====================================================================*/
964 }
965 else if (streq((char *)cmd, "setStyle")) /* obsolete... */
966--- 2309,2315 ----
967 buf->bufp->b_fnum, TRUE);
968 buf->bufp = NULL;
969 buf->initDone = FALSE;
970! do_update = 1;
971 /* =====================================================================*/
972 }
973 else if (streq((char *)cmd, "setStyle")) /* obsolete... */
974***************
975*** 2400,2406 ****
976 return FAIL;
977 }
978
979! doupdate = 1;
980
981 cp = (char *)args;
982 serNum = strtol(cp, &cp, 10);
983--- 2400,2406 ----
984 return FAIL;
985 }
986
987! do_update = 1;
988
989 cp = (char *)args;
990 serNum = strtol(cp, &cp, 10);
991***************
992*** 2448,2454 ****
993 nbdebug((" invalid buffer identifier in removeAnno\n"));
994 return FAIL;
995 }
996! doupdate = 1;
997 cp = (char *)args;
998 serNum = strtol(cp, &cp, 10);
999 args = (char_u *)cp;
1000--- 2448,2454 ----
1001 nbdebug((" invalid buffer identifier in removeAnno\n"));
1002 return FAIL;
1003 }
1004! do_update = 1;
1005 cp = (char *)args;
1006 serNum = strtol(cp, &cp, 10);
1007 args = (char_u *)cp;
1008***************
1009*** 2493,2499 ****
1010 len = strtol(cp, NULL, 10);
1011 args = (char_u *)cp;
1012 pos = off2pos(buf->bufp, off);
1013! doupdate = 1;
1014 if (!pos)
1015 nbdebug((" no such start pos in %s, %ld\n", cmd, off));
1016 else
1017--- 2493,2499 ----
1018 len = strtol(cp, NULL, 10);
1019 args = (char_u *)cp;
1020 pos = off2pos(buf->bufp, off);
1021! do_update = 1;
1022 if (!pos)
1023 nbdebug((" no such start pos in %s, %ld\n", cmd, off));
1024 else
1025***************
1026*** 2555,2561 ****
1027 inAtomic = 0;
1028 if (needupdate)
1029 {
1030! doupdate = 1;
1031 needupdate = 0;
1032 }
1033 /* =====================================================================*/
1034--- 2555,2561 ----
1035 inAtomic = 0;
1036 if (needupdate)
1037 {
1038! do_update = 1;
1039 needupdate = 0;
1040 }
1041 /* =====================================================================*/
1042***************
1043*** 2636,2653 ****
1044 * Unrecognized command is ignored.
1045 */
1046 }
1047! if (inAtomic && doupdate)
1048 {
1049 needupdate = 1;
1050! doupdate = 0;
1051 }
1052
1053 /*
1054 * Is this needed? I moved the netbeans_Xt_connect() later during startup
1055 * and it may no longer be necessary. If its not needed then needupdate
1056! * and doupdate can also be removed.
1057 */
1058! if (buf != NULL && buf->initDone && doupdate)
1059 {
1060 update_screen(NOT_VALID);
1061 setcursor();
1062--- 2636,2653 ----
1063 * Unrecognized command is ignored.
1064 */
1065 }
1066! if (inAtomic && do_update)
1067 {
1068 needupdate = 1;
1069! do_update = 0;
1070 }
1071
1072 /*
1073 * Is this needed? I moved the netbeans_Xt_connect() later during startup
1074 * and it may no longer be necessary. If its not needed then needupdate
1075! * and do_update can also be removed.
1076 */
1077! if (buf != NULL && buf->initDone && do_update)
1078 {
1079 update_screen(NOT_VALID);
1080 setcursor();
1081*** ../vim-7.3.399/src/option.c 2012-01-04 19:34:32.000000000 +0100
1082--- src/option.c 2012-01-10 22:06:03.000000000 +0100
1083***************
1084*** 8584,8591 ****
1085 long_u flags;
1086 {
1087 /* Careful: P_RCLR and P_RALL are a combination of other P_ flags */
1088! int clear = (flags & P_RCLR) == P_RCLR;
1089! int all = ((flags & P_RALL) == P_RALL || clear);
1090
1091 #ifdef FEAT_WINDOWS
1092 if ((flags & P_RSTAT) || all) /* mark all status lines dirty */
1093--- 8584,8591 ----
1094 long_u flags;
1095 {
1096 /* Careful: P_RCLR and P_RALL are a combination of other P_ flags */
1097! int doclear = (flags & P_RCLR) == P_RCLR;
1098! int all = ((flags & P_RALL) == P_RALL || doclear);
1099
1100 #ifdef FEAT_WINDOWS
1101 if ((flags & P_RSTAT) || all) /* mark all status lines dirty */
1102***************
1103*** 8596,8602 ****
1104 changed_window_setting();
1105 if (flags & P_RBUF)
1106 redraw_curbuf_later(NOT_VALID);
1107! if (clear)
1108 redraw_all_later(CLEAR);
1109 else if (all)
1110 redraw_all_later(NOT_VALID);
1111--- 8596,8602 ----
1112 changed_window_setting();
1113 if (flags & P_RBUF)
1114 redraw_curbuf_later(NOT_VALID);
1115! if (doclear)
1116 redraw_all_later(CLEAR);
1117 else if (all)
1118 redraw_all_later(NOT_VALID);
1119*** ../vim-7.3.399/src/os_unix.c 2011-10-20 21:09:25.000000000 +0200
1120--- src/os_unix.c 2012-01-10 21:48:49.000000000 +0100
1121***************
1122*** 3884,3890 ****
1123 char_u *p_shcf_copy = NULL;
1124 int i;
1125 char_u *p;
1126- char_u *s;
1127 int inquote;
1128 int pty_master_fd = -1; /* for pty's */
1129 # ifdef FEAT_GUI
1130--- 3884,3889 ----
1131***************
1132*** 3963,3968 ****
1133--- 3962,3969 ----
1134 }
1135 if (cmd != NULL)
1136 {
1137+ char_u *s;
1138+
1139 if (extra_shell_arg != NULL)
1140 argv[argc++] = (char *)extra_shell_arg;
1141
1142***************
1143*** 4325,4331 ****
1144 linenr_T lnum = curbuf->b_op_start.lnum;
1145 int written = 0;
1146 char_u *lp = ml_get(lnum);
1147- char_u *s;
1148 size_t l;
1149
1150 close(fromshell_fd);
1151--- 4326,4331 ----
1152***************
1153*** 4339,4345 ****
1154 len = write(toshell_fd, "", (size_t)1);
1155 else
1156 {
1157! s = vim_strchr(lp + written, NL);
1158 len = write(toshell_fd, (char *)lp + written,
1159 s == NULL ? l
1160 : (size_t)(s - (lp + written)));
1161--- 4339,4346 ----
1162 len = write(toshell_fd, "", (size_t)1);
1163 else
1164 {
1165! char_u *s = vim_strchr(lp + written, NL);
1166!
1167 len = write(toshell_fd, (char *)lp + written,
1168 s == NULL ? l
1169 : (size_t)(s - (lp + written)));
1170*** ../vim-7.3.399/src/screen.c 2012-01-10 12:42:05.000000000 +0100
1171--- src/screen.c 2012-01-10 22:06:51.000000000 +0100
1172***************
1173*** 7849,7863 ****
1174
1175 /*
1176 * screen_valid - allocate screen buffers if size changed
1177! * If "clear" is TRUE: clear screen if it has been resized.
1178 * Returns TRUE if there is a valid screen to write to.
1179 * Returns FALSE when starting up and screen not initialized yet.
1180 */
1181 int
1182! screen_valid(clear)
1183! int clear;
1184 {
1185! screenalloc(clear); /* allocate screen buffers if size changed */
1186 return (ScreenLines != NULL);
1187 }
1188
1189--- 7849,7863 ----
1190
1191 /*
1192 * screen_valid - allocate screen buffers if size changed
1193! * If "doclear" is TRUE: clear screen if it has been resized.
1194 * Returns TRUE if there is a valid screen to write to.
1195 * Returns FALSE when starting up and screen not initialized yet.
1196 */
1197 int
1198! screen_valid(doclear)
1199! int doclear;
1200 {
1201! screenalloc(doclear); /* allocate screen buffers if size changed */
1202 return (ScreenLines != NULL);
1203 }
1204
1205***************
1206*** 7872,7879 ****
1207 * final size of the shell is needed.
1208 */
1209 void
1210! screenalloc(clear)
1211! int clear;
1212 {
1213 int new_row, old_row;
1214 #ifdef FEAT_GUI
1215--- 7872,7879 ----
1216 * final size of the shell is needed.
1217 */
1218 void
1219! screenalloc(doclear)
1220! int doclear;
1221 {
1222 int new_row, old_row;
1223 #ifdef FEAT_GUI
1224***************
1225*** 8069,8075 ****
1226 * (used when resizing the window at the "--more--" prompt or when
1227 * executing an external command, for the GUI).
1228 */
1229! if (!clear)
1230 {
1231 (void)vim_memset(new_ScreenLines + new_row * Columns,
1232 ' ', (size_t)Columns * sizeof(schar_T));
1233--- 8069,8075 ----
1234 * (used when resizing the window at the "--more--" prompt or when
1235 * executing an external command, for the GUI).
1236 */
1237! if (!doclear)
1238 {
1239 (void)vim_memset(new_ScreenLines + new_row * Columns,
1240 ' ', (size_t)Columns * sizeof(schar_T));
1241***************
1242*** 8159,8165 ****
1243 screen_Columns = Columns;
1244
1245 must_redraw = CLEAR; /* need to clear the screen later */
1246! if (clear)
1247 screenclear2();
1248
1249 #ifdef FEAT_GUI
1250--- 8159,8165 ----
1251 screen_Columns = Columns;
1252
1253 must_redraw = CLEAR; /* need to clear the screen later */
1254! if (doclear)
1255 screenclear2();
1256
1257 #ifdef FEAT_GUI
1258*** ../vim-7.3.399/src/search.c 2011-10-04 17:00:13.000000000 +0200
1259--- src/search.c 2012-01-10 22:07:16.000000000 +0100
1260***************
1261*** 2402,2425 ****
1262 {
1263 if (vim_strchr(p, ';') != NULL) /* there may be comments */
1264 {
1265! int instr = FALSE; /* inside of string */
1266
1267 p = line; /* scan from start */
1268 while ((p = vim_strpbrk(p, (char_u *)"\";")) != NULL)
1269 {
1270 if (*p == '"')
1271 {
1272! if (instr)
1273 {
1274 if (*(p - 1) != '\\') /* skip escaped quote */
1275! instr = FALSE;
1276 }
1277 else if (p == line || ((p - line) >= 2
1278 /* skip #\" form */
1279 && *(p - 1) != '\\' && *(p - 2) != '#'))
1280! instr = TRUE;
1281 }
1282! else if (!instr && ((p - line) < 2
1283 || (*(p - 1) != '\\' && *(p - 2) != '#')))
1284 break; /* found! */
1285 ++p;
1286--- 2402,2425 ----
1287 {
1288 if (vim_strchr(p, ';') != NULL) /* there may be comments */
1289 {
1290! int in_str = FALSE; /* inside of string */
1291
1292 p = line; /* scan from start */
1293 while ((p = vim_strpbrk(p, (char_u *)"\";")) != NULL)
1294 {
1295 if (*p == '"')
1296 {
1297! if (in_str)
1298 {
1299 if (*(p - 1) != '\\') /* skip escaped quote */
1300! in_str = FALSE;
1301 }
1302 else if (p == line || ((p - line) >= 2
1303 /* skip #\" form */
1304 && *(p - 1) != '\\' && *(p - 2) != '#'))
1305! in_str = TRUE;
1306 }
1307! else if (!in_str && ((p - line) < 2
1308 || (*(p - 1) != '\\' && *(p - 2) != '#')))
1309 break; /* found! */
1310 ++p;
1311*** ../vim-7.3.399/src/spell.c 2012-01-10 16:28:41.000000000 +0100
1312--- src/spell.c 2012-01-10 22:09:23.000000000 +0100
1313***************
1314*** 5049,5055 ****
1315 static int offset2bytes __ARGS((int nr, char_u *buf));
1316 static int bytes2offset __ARGS((char_u **pp));
1317 static void sug_write __ARGS((spellinfo_T *spin, char_u *fname));
1318! static void mkspell __ARGS((int fcount, char_u **fnames, int ascii, int overwrite, int added_word));
1319 static void spell_message __ARGS((spellinfo_T *spin, char_u *str));
1320 static void init_spellfile __ARGS((void));
1321
1322--- 5049,5055 ----
1323 static int offset2bytes __ARGS((int nr, char_u *buf));
1324 static int bytes2offset __ARGS((char_u **pp));
1325 static void sug_write __ARGS((spellinfo_T *spin, char_u *fname));
1326! static void mkspell __ARGS((int fcount, char_u **fnames, int ascii, int over_write, int added_word));
1327 static void spell_message __ARGS((spellinfo_T *spin, char_u *str));
1328 static void init_spellfile __ARGS((void));
1329
1330***************
1331*** 9085,9095 ****
1332 * and ".spl" is appended to make the output file name.
1333 */
1334 static void
1335! mkspell(fcount, fnames, ascii, overwrite, added_word)
1336 int fcount;
1337 char_u **fnames;
1338 int ascii; /* -ascii argument given */
1339! int overwrite; /* overwrite existing output file */
1340 int added_word; /* invoked through "zg" */
1341 {
1342 char_u *fname = NULL;
1343--- 9085,9095 ----
1344 * and ".spl" is appended to make the output file name.
1345 */
1346 static void
1347! mkspell(fcount, fnames, ascii, over_write, added_word)
1348 int fcount;
1349 char_u **fnames;
1350 int ascii; /* -ascii argument given */
1351! int over_write; /* overwrite existing output file */
1352 int added_word; /* invoked through "zg" */
1353 {
1354 char_u *fname = NULL;
1355***************
1356*** 9173,9179 ****
1357 {
1358 /* Check for overwriting before doing things that may take a lot of
1359 * time. */
1360! if (!overwrite && mch_stat((char *)wfname, &st) >= 0)
1361 {
1362 EMSG(_(e_exists));
1363 goto theend;
1364--- 9173,9179 ----
1365 {
1366 /* Check for overwriting before doing things that may take a lot of
1367 * time. */
1368! if (!over_write && mch_stat((char *)wfname, &st) >= 0)
1369 {
1370 EMSG(_(e_exists));
1371 goto theend;
1372*** ../vim-7.3.399/src/syntax.c 2011-06-19 04:54:17.000000000 +0200
1373--- src/syntax.c 2012-01-10 22:10:23.000000000 +0100
1374***************
1375*** 4006,4022 ****
1376 }
1377
1378 static void
1379! syn_list_flags(nl, flags, attr)
1380! struct name_list *nl;
1381 int flags;
1382 int attr;
1383 {
1384 int i;
1385
1386! for (i = 0; nl[i].flag != 0; ++i)
1387! if (flags & nl[i].flag)
1388 {
1389! msg_puts_attr((char_u *)nl[i].name, attr);
1390 msg_putchar(' ');
1391 }
1392 }
1393--- 4006,4022 ----
1394 }
1395
1396 static void
1397! syn_list_flags(nlist, flags, attr)
1398! struct name_list *nlist;
1399 int flags;
1400 int attr;
1401 {
1402 int i;
1403
1404! for (i = 0; nlist[i].flag != 0; ++i)
1405! if (flags & nlist[i].flag)
1406 {
1407! msg_puts_attr((char_u *)nlist[i].name, attr);
1408 msg_putchar(' ');
1409 }
1410 }
1411*** ../vim-7.3.399/src/tag.c 2011-12-14 14:15:12.000000000 +0100
1412--- src/tag.c 2012-01-10 21:51:05.000000000 +0100
1413***************
1414*** 1353,1359 ****
1415 int match_count = 0; /* number of matches found */
1416 char_u **matches;
1417 int mtt;
1418- int len;
1419 int help_save;
1420 #ifdef FEAT_MULTI_LANG
1421 int help_pri = 0;
1422--- 1353,1358 ----
1423***************
1424*** 2235,2240 ****
1425--- 2234,2241 ----
1426 */
1427 if (ga_grow(&ga_match[mtt], 1) == OK)
1428 {
1429+ int len;
1430+
1431 if (help_only)
1432 {
1433 #ifdef FEAT_MULTI_LANG
1434*** ../vim-7.3.399/src/window.c 2011-12-30 15:01:55.000000000 +0100
1435--- src/window.c 2012-01-10 22:11:41.000000000 +0100
1436***************
1437*** 683,701 ****
1438 }
1439
1440 /*
1441! * When "newwin" is NULL: split the current window in two.
1442! * When "newwin" is not NULL: insert this window at the far
1443 * top/left/right/bottom.
1444 * return FAIL for failure, OK otherwise
1445 */
1446 int
1447! win_split_ins(size, flags, newwin, dir)
1448 int size;
1449 int flags;
1450! win_T *newwin;
1451 int dir;
1452 {
1453! win_T *wp = newwin;
1454 win_T *oldwin;
1455 int new_size = size;
1456 int i;
1457--- 683,701 ----
1458 }
1459
1460 /*
1461! * When "new_wp" is NULL: split the current window in two.
1462! * When "new_wp" is not NULL: insert this window at the far
1463 * top/left/right/bottom.
1464 * return FAIL for failure, OK otherwise
1465 */
1466 int
1467! win_split_ins(size, flags, new_wp, dir)
1468 int size;
1469 int flags;
1470! win_T *new_wp;
1471 int dir;
1472 {
1473! win_T *wp = new_wp;
1474 win_T *oldwin;
1475 int new_size = size;
1476 int i;
1477***************
1478*** 718,724 ****
1479 /* add a status line when p_ls == 1 and splitting the first window */
1480 if (lastwin == firstwin && p_ls == 1 && oldwin->w_status_height == 0)
1481 {
1482! if (oldwin->w_height <= p_wmh && newwin == NULL)
1483 {
1484 EMSG(_(e_noroom));
1485 return FAIL;
1486--- 718,724 ----
1487 /* add a status line when p_ls == 1 and splitting the first window */
1488 if (lastwin == firstwin && p_ls == 1 && oldwin->w_status_height == 0)
1489 {
1490! if (oldwin->w_height <= p_wmh && new_wp == NULL)
1491 {
1492 EMSG(_(e_noroom));
1493 return FAIL;
1494***************
1495*** 751,757 ****
1496 }
1497 else
1498 available = oldwin->w_width;
1499! if (available < needed && newwin == NULL)
1500 {
1501 EMSG(_(e_noroom));
1502 return FAIL;
1503--- 751,757 ----
1504 }
1505 else
1506 available = oldwin->w_width;
1507! if (available < needed && new_wp == NULL)
1508 {
1509 EMSG(_(e_noroom));
1510 return FAIL;
1511***************
1512*** 815,821 ****
1513 available = oldwin->w_height;
1514 needed += p_wmh;
1515 }
1516! if (available < needed && newwin == NULL)
1517 {
1518 EMSG(_(e_noroom));
1519 return FAIL;
1520--- 815,821 ----
1521 available = oldwin->w_height;
1522 needed += p_wmh;
1523 }
1524! if (available < needed && new_wp == NULL)
1525 {
1526 EMSG(_(e_noroom));
1527 return FAIL;
1528***************
1529*** 888,907 ****
1530 p_sb))))
1531 {
1532 /* new window below/right of current one */
1533! if (newwin == NULL)
1534 wp = win_alloc(oldwin, FALSE);
1535 else
1536 win_append(oldwin, wp);
1537 }
1538 else
1539 {
1540! if (newwin == NULL)
1541 wp = win_alloc(oldwin->w_prev, FALSE);
1542 else
1543 win_append(oldwin->w_prev, wp);
1544 }
1545
1546! if (newwin == NULL)
1547 {
1548 if (wp == NULL)
1549 return FAIL;
1550--- 888,907 ----
1551 p_sb))))
1552 {
1553 /* new window below/right of current one */
1554! if (new_wp == NULL)
1555 wp = win_alloc(oldwin, FALSE);
1556 else
1557 win_append(oldwin, wp);
1558 }
1559 else
1560 {
1561! if (new_wp == NULL)
1562 wp = win_alloc(oldwin->w_prev, FALSE);
1563 else
1564 win_append(oldwin->w_prev, wp);
1565 }
1566
1567! if (new_wp == NULL)
1568 {
1569 if (wp == NULL)
1570 return FAIL;
1571***************
1572*** 972,981 ****
1573 frp->fr_parent = curfrp;
1574 }
1575
1576! if (newwin == NULL)
1577 frp = wp->w_frame;
1578 else
1579! frp = newwin->w_frame;
1580 frp->fr_parent = curfrp->fr_parent;
1581
1582 /* Insert the new frame at the right place in the frame list. */
1583--- 972,981 ----
1584 frp->fr_parent = curfrp;
1585 }
1586
1587! if (new_wp == NULL)
1588 frp = wp->w_frame;
1589 else
1590! frp = new_wp->w_frame;
1591 frp->fr_parent = curfrp->fr_parent;
1592
1593 /* Insert the new frame at the right place in the frame list. */
1594***************
1595*** 4284,4302 ****
1596 win_T *after UNUSED;
1597 int hidden UNUSED;
1598 {
1599! win_T *newwin;
1600
1601 /*
1602 * allocate window structure and linesizes arrays
1603 */
1604! newwin = (win_T *)alloc_clear((unsigned)sizeof(win_T));
1605! if (newwin != NULL && win_alloc_lines(newwin) == FAIL)
1606 {
1607! vim_free(newwin);
1608! newwin = NULL;
1609 }
1610
1611! if (newwin != NULL)
1612 {
1613 #ifdef FEAT_AUTOCMD
1614 /* Don't execute autocommands while the window is not properly
1615--- 4284,4302 ----
1616 win_T *after UNUSED;
1617 int hidden UNUSED;
1618 {
1619! win_T *new_wp;
1620
1621 /*
1622 * allocate window structure and linesizes arrays
1623 */
1624! new_wp = (win_T *)alloc_clear((unsigned)sizeof(win_T));
1625! if (new_wp != NULL && win_alloc_lines(new_wp) == FAIL)
1626 {
1627! vim_free(new_wp);
1628! new_wp = NULL;
1629 }
1630
1631! if (new_wp != NULL)
1632 {
1633 #ifdef FEAT_AUTOCMD
1634 /* Don't execute autocommands while the window is not properly
1635***************
1636*** 4309,4361 ****
1637 */
1638 #ifdef FEAT_WINDOWS
1639 if (!hidden)
1640! win_append(after, newwin);
1641 #endif
1642 #ifdef FEAT_VERTSPLIT
1643! newwin->w_wincol = 0;
1644! newwin->w_width = Columns;
1645 #endif
1646
1647 /* position the display and the cursor at the top of the file. */
1648! newwin->w_topline = 1;
1649 #ifdef FEAT_DIFF
1650! newwin->w_topfill = 0;
1651 #endif
1652! newwin->w_botline = 2;
1653! newwin->w_cursor.lnum = 1;
1654 #ifdef FEAT_SCROLLBIND
1655! newwin->w_scbind_pos = 1;
1656 #endif
1657
1658 /* We won't calculate w_fraction until resizing the window */
1659! newwin->w_fraction = 0;
1660! newwin->w_prev_fraction_row = -1;
1661
1662 #ifdef FEAT_GUI
1663 if (gui.in_use)
1664 {
1665! gui_create_scrollbar(&newwin->w_scrollbars[SBAR_LEFT],
1666! SBAR_LEFT, newwin);
1667! gui_create_scrollbar(&newwin->w_scrollbars[SBAR_RIGHT],
1668! SBAR_RIGHT, newwin);
1669 }
1670 #endif
1671 #ifdef FEAT_EVAL
1672 /* init w: variables */
1673! init_var_dict(&newwin->w_vars, &newwin->w_winvar);
1674 #endif
1675 #ifdef FEAT_FOLDING
1676! foldInitWin(newwin);
1677 #endif
1678 #ifdef FEAT_AUTOCMD
1679 unblock_autocmds();
1680 #endif
1681 #ifdef FEAT_SEARCH_EXTRA
1682! newwin->w_match_head = NULL;
1683! newwin->w_next_match_id = 4;
1684 #endif
1685 }
1686! return newwin;
1687 }
1688
1689 #if defined(FEAT_WINDOWS) || defined(PROTO)
1690--- 4309,4361 ----
1691 */
1692 #ifdef FEAT_WINDOWS
1693 if (!hidden)
1694! win_append(after, new_wp);
1695 #endif
1696 #ifdef FEAT_VERTSPLIT
1697! new_wp->w_wincol = 0;
1698! new_wp->w_width = Columns;
1699 #endif
1700
1701 /* position the display and the cursor at the top of the file. */
1702! new_wp->w_topline = 1;
1703 #ifdef FEAT_DIFF
1704! new_wp->w_topfill = 0;
1705 #endif
1706! new_wp->w_botline = 2;
1707! new_wp->w_cursor.lnum = 1;
1708 #ifdef FEAT_SCROLLBIND
1709! new_wp->w_scbind_pos = 1;
1710 #endif
1711
1712 /* We won't calculate w_fraction until resizing the window */
1713! new_wp->w_fraction = 0;
1714! new_wp->w_prev_fraction_row = -1;
1715
1716 #ifdef FEAT_GUI
1717 if (gui.in_use)
1718 {
1719! gui_create_scrollbar(&new_wp->w_scrollbars[SBAR_LEFT],
1720! SBAR_LEFT, new_wp);
1721! gui_create_scrollbar(&new_wp->w_scrollbars[SBAR_RIGHT],
1722! SBAR_RIGHT, new_wp);
1723 }
1724 #endif
1725 #ifdef FEAT_EVAL
1726 /* init w: variables */
1727! init_var_dict(&new_wp->w_vars, &new_wp->w_winvar);
1728 #endif
1729 #ifdef FEAT_FOLDING
1730! foldInitWin(new_wp);
1731 #endif
1732 #ifdef FEAT_AUTOCMD
1733 unblock_autocmds();
1734 #endif
1735 #ifdef FEAT_SEARCH_EXTRA
1736! new_wp->w_match_head = NULL;
1737! new_wp->w_next_match_id = 4;
1738 #endif
1739 }
1740! return new_wp;
1741 }
1742
1743 #if defined(FEAT_WINDOWS) || defined(PROTO)
1744*** ../vim-7.3.399/src/version.c 2012-01-10 18:37:53.000000000 +0100
1745--- src/version.c 2012-01-10 22:23:10.000000000 +0100
1746***************
1747*** 716,717 ****
1748--- 716,719 ----
1749 { /* Add new patch number below this line */
1750+ /**/
1751+ 400,
1752 /**/
1753
1754--
1755A parent can be arrested if his child cannot hold back a burp during a church
1756service.
1757 [real standing law in Nebraska, United States of America]
1758
1759 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
1760/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
1761\\\ an exciting new programming language -- http://www.Zimbu.org ///
1762 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.214566 seconds and 4 git commands to generate.