Mirror of the Vim source from https://github.com/vim/vim
修訂 | a112fdce9ebd6d538c70602550e94f29a2fc60fc (tree) |
---|---|
時間 | 2007-02-20 11:49:19 |
作者 | vimboss |
Commiter | vimboss |
updated for version 7.0-200
@@ -1822,14 +1822,20 @@ | ||
1822 | 1822 | |
1823 | 1823 | idx = diff_buf_idx(wp->w_buffer); |
1824 | 1824 | if (idx == DB_COUNT) /* cannot happen */ |
1825 | + { | |
1826 | + vim_free(line_org); | |
1825 | 1827 | return FALSE; |
1828 | + } | |
1826 | 1829 | |
1827 | 1830 | /* search for a change that includes "lnum" in the list of diffblocks. */ |
1828 | 1831 | for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next) |
1829 | 1832 | if (lnum <= dp->df_lnum[idx] + dp->df_count[idx]) |
1830 | 1833 | break; |
1831 | 1834 | if (dp == NULL || diff_check_sanity(curtab, dp) == FAIL) |
1835 | + { | |
1836 | + vim_free(line_org); | |
1832 | 1837 | return FALSE; |
1838 | + } | |
1833 | 1839 | |
1834 | 1840 | off = lnum - dp->df_lnum[idx]; |
1835 | 1841 |
@@ -2698,6 +2698,7 @@ | ||
2698 | 2698 | buf = alloc(LSIZE); |
2699 | 2699 | if (buf == NULL) |
2700 | 2700 | return; |
2701 | + regmatch.regprog = NULL; /* so that we can goto theend */ | |
2701 | 2702 | |
2702 | 2703 | /* If 'infercase' is set, don't use 'smartcase' here */ |
2703 | 2704 | save_p_scs = p_scs; |
@@ -2712,13 +2713,13 @@ | ||
2712 | 2713 | char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\"); |
2713 | 2714 | |
2714 | 2715 | if (pat_esc == NULL) |
2715 | - return ; | |
2716 | + goto theend ; | |
2716 | 2717 | i = (int)STRLEN(pat_esc) + 10; |
2717 | 2718 | ptr = alloc(i); |
2718 | 2719 | if (ptr == NULL) |
2719 | 2720 | { |
2720 | 2721 | vim_free(pat_esc); |
2721 | - return; | |
2722 | + goto theend; | |
2722 | 2723 | } |
2723 | 2724 | vim_snprintf((char *)ptr, i, "^\\s*\\zs\\V%s", pat_esc); |
2724 | 2725 | regmatch.regprog = vim_regcomp(ptr, RE_MAGIC); |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 200, | |
671 | +/**/ | |
670 | 672 | 199, |
671 | 673 | /**/ |
672 | 674 | 198, |