mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
vim-patch:9.0.0947: invalid memory access in substitute with function (#23126)
Problem: Invalid memory access in substitute with function that goes to
another file.
Solution: Check for text locked in CTRL-W gf.
cc762a48d4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -504,6 +504,9 @@ newwindow:
|
||||
case Ctrl_F: {
|
||||
wingotofile:
|
||||
CHECK_CMDWIN;
|
||||
if (check_text_or_curbuf_locked(NULL)) {
|
||||
break;
|
||||
}
|
||||
|
||||
linenr_T lnum = -1;
|
||||
char *ptr = grab_file_name(Prenum1, &lnum);
|
||||
@@ -1068,10 +1071,10 @@ int win_split(int size, int flags)
|
||||
return win_split_ins(size, flags, NULL, 0);
|
||||
}
|
||||
|
||||
// When "new_wp" is NULL: split the current window in two.
|
||||
// When "new_wp" is not NULL: insert this window at the far
|
||||
// top/left/right/bottom.
|
||||
// return FAIL for failure, OK otherwise
|
||||
/// When "new_wp" is NULL: split the current window in two.
|
||||
/// When "new_wp" is not NULL: insert this window at the far
|
||||
/// top/left/right/bottom.
|
||||
/// @return FAIL for failure, OK otherwise
|
||||
int win_split_ins(int size, int flags, win_T *new_wp, int dir)
|
||||
{
|
||||
win_T *wp = new_wp;
|
||||
|
Reference in New Issue
Block a user