0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.0947: invalid memory access in substitute with function

Problem:    Invalid memory access in substitute with function that goes to
            another file.
Solution:   Check for text locked in CTRL-W gf.
This commit is contained in:
Bram Moolenaar
2022-11-25 13:03:31 +00:00
parent ad85af5b38
commit cc762a48d4
5 changed files with 49 additions and 10 deletions

View File

@@ -567,6 +567,8 @@ newwindow:
case Ctrl_F:
wingotofile:
CHECK_CMDWIN;
if (check_text_or_curbuf_locked(NULL))
break;
ptr = grab_file_name(Prenum1, &lnum);
if (ptr != NULL)
@@ -885,7 +887,7 @@ win_split(int size, int flags)
* 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
* Return FAIL for failure, OK otherwise.
*/
int
win_split_ins(