From: Doug Kearns Date: Sun, 21 Jun 2026 13:03:21 +0000 (+0000) Subject: patch 9.2.0684: :reg # does not display the value of the '#' register X-Git-Tag: v9.2.0684^0 X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;h=0cafe56b7415be5b3bf1003d8a52d293efd9bc2e;p=thirdparty%2Fvim.git patch 9.2.0684: :reg # does not display the value of the '#' register Problem: ':registers #' does not display the value of the '#' register. Solution: Filter the '#' :registers output on a '#' arg instead of '%' (Doug Kearns). closes: #20589 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- diff --git a/src/register.c b/src/register.c index 971cd70891..95a1145e43 100644 --- a/src/register.c +++ b/src/register.c @@ -2759,7 +2759,7 @@ ex_display(exarg_T *eap) } // display alternate file name - if ((arg == NULL || vim_strchr(arg, '%') != NULL) && !got_int) + if ((arg == NULL || vim_strchr(arg, '#') != NULL) && !got_int) { char_u *fname; linenr_T dummy; diff --git a/src/testdir/test_registers.vim b/src/testdir/test_registers.vim index 1bf3d6f607..e1c493ac4b 100644 --- a/src/testdir/test_registers.vim +++ b/src/testdir/test_registers.vim @@ -51,7 +51,7 @@ func Test_display_registers() " these commands work in the sandbox let a = execute('sandbox display') " When X11 connection is not available, there is a warning W23 - " filter this out (we could also run the :display comamand twice) + " filter this out (we could also run the :display command twice) let a = substitute(a, 'W23.*0\n', '', '') let b = execute('sandbox registers') @@ -77,6 +77,14 @@ func Test_display_registers() call assert_match('^\nType Name Content\n' \ . ' c ": ls', a) + let a = execute('registers %') + call assert_match('^\nType Name Content\n' + \ . ' c "% file2', a) + + let a = execute('registers #') + call assert_match('^\nType Name Content\n' + \ . ' c "# file1', a) + bwipe! endfunc diff --git a/src/version.c b/src/version.c index fc1ecbce0d..9fba8ef19c 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 684, /**/ 683, /**/