diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-02-20 23:55:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 23:55:42 +0800 |
commit | 3507474611a03d88137a1d97666515b551c39cb3 (patch) | |
tree | a9977922be490356c949a1efc0c0e28bfd0ae8e5 /src/nvim/usercmd.c | |
parent | 93c627b90b4955967943b7a47fe63b094a0c50e6 (diff) | |
download | rneovim-3507474611a03d88137a1d97666515b551c39cb3.tar.gz rneovim-3507474611a03d88137a1d97666515b551c39cb3.tar.bz2 rneovim-3507474611a03d88137a1d97666515b551c39cb3.zip |
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)
https://github.com/vim/vim/commit/b444ee761a2956a996a75d923281c51fa1a759f3
Diffstat (limited to 'src/nvim/usercmd.c')
-rw-r--r-- | src/nvim/usercmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/usercmd.c b/src/nvim/usercmd.c index 3a5a4c3e91..6869f7eaf9 100644 --- a/src/nvim/usercmd.c +++ b/src/nvim/usercmd.c @@ -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) { |