0
0
mirror of https://github.com/vim/vim.git synced 2025-11-14 23:04:02 -05:00

patch 9.1.1213: cannot :put while keeping indent

Problem:  cannot :put while keeping indent
          (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)

fixes: #16225
closes: #16886

Signed-off-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
64-bitman
2025-03-16 21:10:47 +01:00
committed by Christian Brabandt
parent 7ceca3eb00
commit 250739d442
18 changed files with 268 additions and 81 deletions

View File

@@ -2161,9 +2161,12 @@ compile_variable_range(exarg_T *eap, cctx_T *cctx)
/*
* :put r
* :put ={expr}
* or if fixindent == TRUE
* :iput r
* :iput ={expr}
*/
char_u *
compile_put(char_u *arg, exarg_T *eap, cctx_T *cctx)
compile_put(char_u *arg, exarg_T *eap, cctx_T *cctx, int fixindent)
{
char_u *line = arg;
linenr_T lnum;
@@ -2202,7 +2205,8 @@ compile_put(char_u *arg, exarg_T *eap, cctx_T *cctx)
--lnum;
}
generate_PUT(cctx, eap->regname, lnum);
generate_PUT(cctx, eap->regname, lnum, fixindent);
return line;
}