mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 07:18:17 +00:00
vim patches 7.4.955/974/975/989. #3919
Helped by @Shougo. vim-patch:7.4.955 vim-patch:7.4.974 vim-patch:7.4.975 vim-patch:7.4.989 Port upstream vim patches 955, 974, 975 and 989. Mark patches 964, 968, 970, and 971, and 982 as NA. Update patch list to 1022. patch 7.4.955 Problem: Vim doesn't recognize .pl6 and .pod6 files. Solution: Recognize them as perl6 and pod6. (Mike Eve) patch 7.4.974 Problem: When using :diffsplit the cursor jumps to the first line. Solution: Put the cursor on the line related to where the cursor was before the split. patch 7.4.975 Problem: Using ":sort" on a very big file sometimes causes text to be corrupted. (John Beckett) Solution: Copy the line into a buffer before calling ml_append(). patch 7.4.989 Problem: Leaking memory when hash_add() fails. Coverity error 99126. Solution: When hash_add() fails free the memory. 778 marked as not NA as it will be needed once vim patch 754 is merged Marked as NA: 964 test 87 was deleted 968 tests 86/87 were deleted 970 guarded by: `# if defined(FEAT_GUI_GTK) || defined(PROTO` and is inside a function that no longer exists 971 function table already sorted correctly 982 marked as NA because Neovim tests are only specified in exactly one location
This commit is contained in:

committed by
Justin M. Keyes

parent
8bfb521417
commit
5c87d40acd
@@ -1393,7 +1393,7 @@ else
|
|||||||
au BufNewFile,BufRead *.pl call s:FTpl()
|
au BufNewFile,BufRead *.pl call s:FTpl()
|
||||||
endif
|
endif
|
||||||
au BufNewFile,BufRead *.plx,*.al setf perl
|
au BufNewFile,BufRead *.plx,*.al setf perl
|
||||||
au BufNewFile,BufRead *.p6,*.pm6 setf perl6
|
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
|
||||||
|
|
||||||
func! s:FTpl()
|
func! s:FTpl()
|
||||||
if exists("g:filetype_pl")
|
if exists("g:filetype_pl")
|
||||||
@@ -1422,6 +1422,7 @@ au BufNewFile,BufRead *.pm
|
|||||||
|
|
||||||
" Perl POD
|
" Perl POD
|
||||||
au BufNewFile,BufRead *.pod setf pod
|
au BufNewFile,BufRead *.pod setf pod
|
||||||
|
au BufNewFile,BufRead *.pod6 setf pod6
|
||||||
|
|
||||||
" Php, php3, php4, etc.
|
" Php, php3, php4, etc.
|
||||||
" Also Phtml (was used for PHP 2 in the past)
|
" Also Phtml (was used for PHP 2 in the past)
|
||||||
|
@@ -1007,6 +1007,7 @@ theend:
|
|||||||
void ex_diffsplit(exarg_T *eap)
|
void ex_diffsplit(exarg_T *eap)
|
||||||
{
|
{
|
||||||
win_T *old_curwin = curwin;
|
win_T *old_curwin = curwin;
|
||||||
|
buf_T *old_curbuf = curbuf;
|
||||||
|
|
||||||
// don't use a new tab page, each tab page has its own diffs
|
// don't use a new tab page, each tab page has its own diffs
|
||||||
cmdmod.tab = 0;
|
cmdmod.tab = 0;
|
||||||
@@ -1020,8 +1021,19 @@ void ex_diffsplit(exarg_T *eap)
|
|||||||
// split must have worked
|
// split must have worked
|
||||||
if (curwin != old_curwin) {
|
if (curwin != old_curwin) {
|
||||||
// Set 'diff', 'scrollbind' on and 'wrap' off.
|
// Set 'diff', 'scrollbind' on and 'wrap' off.
|
||||||
diff_win_options(curwin, TRUE);
|
diff_win_options(curwin, true);
|
||||||
diff_win_options(old_curwin, TRUE);
|
if (win_valid(old_curwin)) {
|
||||||
|
diff_win_options(old_curwin, true);
|
||||||
|
|
||||||
|
if (buf_valid(old_curbuf)) {
|
||||||
|
// Move the cursor position to that of the old window.
|
||||||
|
curwin->w_cursor.lnum = diff_get_corresponding_line(
|
||||||
|
old_curbuf,
|
||||||
|
old_curwin->w_cursor.lnum,
|
||||||
|
curbuf,
|
||||||
|
curwin->w_cursor.lnum);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -19793,7 +19793,10 @@ void ex_function(exarg_T *eap)
|
|||||||
|
|
||||||
/* insert the new function in the function list */
|
/* insert the new function in the function list */
|
||||||
STRCPY(fp->uf_name, name);
|
STRCPY(fp->uf_name, name);
|
||||||
hash_add(&func_hashtab, UF2HIKEY(fp));
|
if (hash_add(&func_hashtab, UF2HIKEY(fp)) == FAIL) {
|
||||||
|
xfree(fp);
|
||||||
|
goto erret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fp->uf_refcount = 1;
|
fp->uf_refcount = 1;
|
||||||
fp->uf_args = newargs;
|
fp->uf_args = newargs;
|
||||||
|
@@ -495,10 +495,12 @@ void ex_sort(exarg_T *eap)
|
|||||||
s = ml_get(nrs[eap->forceit ? count - i - 1 : i].lnum);
|
s = ml_get(nrs[eap->forceit ? count - i - 1 : i].lnum);
|
||||||
if (!unique || i == 0
|
if (!unique || i == 0
|
||||||
|| (sort_ic ? STRICMP(s, sortbuf1) : STRCMP(s, sortbuf1)) != 0) {
|
|| (sort_ic ? STRICMP(s, sortbuf1) : STRCMP(s, sortbuf1)) != 0) {
|
||||||
if (ml_append(lnum++, s, (colnr_T)0, FALSE) == FAIL)
|
// Copy the line into a buffer, it may become invalid in
|
||||||
break;
|
// ml_append(). And it's needed for "unique".
|
||||||
if (unique)
|
|
||||||
STRCPY(sortbuf1, s);
|
STRCPY(sortbuf1, s);
|
||||||
|
if (ml_append(lnum++, sortbuf1, (colnr_T)0, false) == FAIL) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fast_breakcheck();
|
fast_breakcheck();
|
||||||
if (got_int)
|
if (got_int)
|
||||||
|
@@ -135,32 +135,32 @@ static int included_patches[] = {
|
|||||||
// 992 NA
|
// 992 NA
|
||||||
// 991,
|
// 991,
|
||||||
// 990 NA
|
// 990 NA
|
||||||
// 989,
|
989,
|
||||||
// 988 NA
|
// 988 NA
|
||||||
// 987 NA
|
// 987 NA
|
||||||
// 986 NA
|
// 986 NA
|
||||||
// 985 NA
|
// 985 NA
|
||||||
// 984,
|
// 984,
|
||||||
// 983,
|
// 983,
|
||||||
// 982,
|
// 982 NA
|
||||||
// 981,
|
// 981,
|
||||||
// 980,
|
// 980,
|
||||||
// 979 NA
|
// 979 NA
|
||||||
// 978,
|
// 978,
|
||||||
// 977,
|
// 977,
|
||||||
// 976 NA
|
// 976 NA
|
||||||
// 975,
|
975,
|
||||||
// 974,
|
// 974,
|
||||||
// 973,
|
// 973,
|
||||||
// 972,
|
972,
|
||||||
// 971,
|
// 971 NA
|
||||||
// 970,
|
// 970 NA
|
||||||
// 969,
|
// 969,
|
||||||
// 968,
|
// 968 NA
|
||||||
// 967 NA
|
// 967 NA
|
||||||
// 966 NA
|
// 966 NA
|
||||||
// 965 NA
|
// 965 NA
|
||||||
// 964,
|
// 964 NA
|
||||||
// 963,
|
// 963,
|
||||||
// 962 NA
|
// 962 NA
|
||||||
// 961,
|
// 961,
|
||||||
@@ -169,7 +169,7 @@ static int included_patches[] = {
|
|||||||
// 958,
|
// 958,
|
||||||
// 957,
|
// 957,
|
||||||
// 956,
|
// 956,
|
||||||
// 955,
|
955,
|
||||||
// 954 NA
|
// 954 NA
|
||||||
953,
|
953,
|
||||||
// 952,
|
// 952,
|
||||||
@@ -346,7 +346,7 @@ static int included_patches[] = {
|
|||||||
781,
|
781,
|
||||||
// 780 NA
|
// 780 NA
|
||||||
// 779,
|
// 779,
|
||||||
// 778 NA
|
// 778,
|
||||||
// 777 NA
|
// 777 NA
|
||||||
776,
|
776,
|
||||||
775,
|
775,
|
||||||
|
Reference in New Issue
Block a user