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:
zeertzjq
2023-04-16 17:44:14 +08:00
committed by GitHub
parent c54592bfda
commit b28683d252
3 changed files with 27 additions and 5 deletions

View File

@@ -462,7 +462,7 @@ static bool check_text_locked(oparg_T *oap)
/// If text is locked, "curbuf->b_ro_locked" or "allbuf_lock" is set:
/// Give an error message, possibly beep and return true.
/// "oap" may be NULL.
static bool check_text_or_curbuf_locked(oparg_T *oap)
bool check_text_or_curbuf_locked(oparg_T *oap)
{
if (check_text_locked(oap)) {
return true;