diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-07 18:16:36 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-07 18:16:36 +0200 |
commit | bb861e293e0170455184079fa537278754b07911 (patch) | |
tree | d5f14938d1ebbf6cde67bdf6d2e26a6391106d32 /src/register.c | |
parent | c82dd86084581afa5113b0dd9ade7a631b89b4fc (diff) | |
download | vim-git-bb861e293e0170455184079fa537278754b07911.tar.gz |
patch 8.2.0924: cannot save and restore a register properlyv8.2.0924
Problem: Cannot save and restore a register properly.
Solution: Add getreginfo() and make setreg() accept a dictionary. (Andy
Massimino, closes #3370)
Diffstat (limited to 'src/register.c')
-rw-r--r-- | src/register.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/register.c b/src/register.c index e56149f39..f89a530b4 100644 --- a/src/register.c +++ b/src/register.c @@ -2111,6 +2111,15 @@ get_register_name(int num) } /* + * Return the index of the register "" points to. + */ + int +get_unname_register() +{ + return y_previous == NULL ? -1 : y_previous - &y_regs[0]; +} + +/* * ":dis" and ":registers": Display the contents of the yank registers. */ void |