diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-03-27 09:06:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-27 01:06:46 +0000 |
commit | 750e1836afb49b860fa11b4336a7ae351720a553 (patch) | |
tree | d46b75c6d0bc947fcfc268e2e103e6fdf1a9547a /src/nvim/api/command.c | |
parent | 8f40ffdb92b6ca25529b470e4a4e2bb7ddbb000a (diff) | |
download | rneovim-750e1836afb49b860fa11b4336a7ae351720a553.tar.gz rneovim-750e1836afb49b860fa11b4336a7ae351720a553.tar.bz2 rneovim-750e1836afb49b860fa11b4336a7ae351720a553.zip |
vim-patch:9.1.1224: cannot :put while keeping indent (#33076)
Problem: cannot :put while keeping indent (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)
fixes: vim/vim#16225
closes: vim/vim#16886
https://github.com/vim/vim/commit/e08f10a55c3f15b0b4af631908551d88ec4fe502
Cherry-pick test_put.vim changes from patch 8.2.1593.
N/A patches:
vim-patch:9.1.1213: cannot :put while keeping indent
vim-patch:9.1.1215: Patch 9.1.1213 has some issues
Co-authored-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Diffstat (limited to 'src/nvim/api/command.c')
-rw-r--r-- | src/nvim/api/command.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/api/command.c b/src/nvim/api/command.c index de83ff97f7..4b93f09c61 100644 --- a/src/nvim/api/command.c +++ b/src/nvim/api/command.c @@ -504,7 +504,9 @@ String nvim_cmd(uint64_t channel_id, Dict(cmd) *cmd, Dict(cmd_opts) *opts, Arena VALIDATE((regname != '='), "%s", "Cannot use register \"=", { goto end; }); - VALIDATE(valid_yank_reg(regname, ea.cmdidx != CMD_put && !IS_USER_CMDIDX(ea.cmdidx)), + VALIDATE(valid_yank_reg(regname, + (!IS_USER_CMDIDX(ea.cmdidx) + && ea.cmdidx != CMD_put && ea.cmdidx != CMD_iput)), "Invalid register: \"%c", regname, { goto end; }); |