mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 9.0.1332: crash when using buffer-local user command in cmdline window
Problem: Crash when using buffer-local user command in cmdline window. (Karl Yngve Lervåg) Solution: Use the right buffer to find the user command. (closes #12030, closes #12029)
This commit is contained in:
@@ -1838,7 +1838,7 @@ do_ucmd(exarg_T *eap)
|
||||
if (eap->cmdidx == CMD_USER)
|
||||
cmd = USER_CMD(eap->useridx);
|
||||
else
|
||||
cmd = USER_CMD_GA(&curbuf->b_ucmds, eap->useridx);
|
||||
cmd = USER_CMD_GA(&prevwin_curwin()->w_buffer->b_ucmds, eap->useridx);
|
||||
|
||||
/*
|
||||
* Replace <> in the command by the arguments.
|
||||
|
Reference in New Issue
Block a user