diff options
| author | AdnoC <adam.r.cutler@gmail.com> | 2016-05-04 14:16:19 -0400 |
|---|---|---|
| committer | AdnoC <adam.r.cutler@gmail.com> | 2017-05-31 13:19:08 -0400 |
| commit | 9a91ce4fa6a7504644e10a6761eae5cc5699159a (patch) | |
| tree | 1afe9cfbb2c5a3a0254289993c34c68cbc5b83fc /src/nvim/ops.c | |
| parent | a00b03d03f1c8e3aced87c54da7223672bce720d (diff) | |
| download | rneovim-9a91ce4fa6a7504644e10a6761eae5cc5699159a.tar.gz rneovim-9a91ce4fa6a7504644e10a6761eae5cc5699159a.tar.bz2 rneovim-9a91ce4fa6a7504644e10a6761eae5cc5699159a.zip | |
eval: Add ability to set the unnamed register with setreg
Diffstat (limited to 'src/nvim/ops.c')
| -rw-r--r-- | src/nvim/ops.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 9e5121b3fe..90d9d41a2a 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -5853,3 +5853,19 @@ const yankreg_T *op_register_get(const char name) } return &y_regs[i]; } + +/// Set the previous yank register +/// +/// @param[in] name Register name. +/// +/// @return true on success, false on failure. +bool op_register_set_previous(const char name) +{ + int i = op_reg_index(name); + if (i == -1) { + return false; + } + + y_previous = &y_regs[i]; + return true; +} |
