mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:9.0.1332: crash when using buffer-local user command in cmdline window (#22346)
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 vim/vim#12030,
closes vim/vim#12029)
b444ee761a
This commit is contained in:
@@ -1625,7 +1625,7 @@ int do_ucmd(exarg_T *eap, bool preview)
|
||||
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);
|
||||
}
|
||||
|
||||
if (preview) {
|
||||
|
Reference in New Issue
Block a user