aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api/command.c')
-rw-r--r--src/nvim/api/command.c4
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;
});