From bb861e293e0170455184079fa537278754b07911 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 7 Jun 2020 18:16:36 +0200 Subject: patch 8.2.0924: cannot save and restore a register properly Problem: Cannot save and restore a register properly. Solution: Add getreginfo() and make setreg() accept a dictionary. (Andy Massimino, closes #3370) --- src/register.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/register.c') diff --git a/src/register.c b/src/register.c index e56149f39..f89a530b4 100644 --- a/src/register.c +++ b/src/register.c @@ -2110,6 +2110,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. */ -- cgit v1.2.1