mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.1356: Vim9: cannot get the percent register
Problem: Vim9: cannot get the percent register. Solution: Check for readable registers instead of writable. (closes #6566)
This commit is contained in:
parent
c2ee44cc38
commit
7226e5b19b
@ -1430,6 +1430,15 @@ enddef
|
||||
def Test_expr7_register()
|
||||
@a = 'register a'
|
||||
assert_equal('register a', @a)
|
||||
|
||||
let fname = expand('%')
|
||||
assert_equal(fname, @%)
|
||||
|
||||
feedkeys(":echo 'some'\<CR>", "xt")
|
||||
assert_equal("echo 'some'", @:)
|
||||
|
||||
normal axyz
|
||||
assert_equal("xyz", @.)
|
||||
enddef
|
||||
|
||||
def Test_expr7_namespace()
|
||||
|
@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1356,
|
||||
/**/
|
||||
1355,
|
||||
/**/
|
||||
|
@ -3565,7 +3565,7 @@ compile_get_register(char_u **arg, cctx_T *cctx)
|
||||
semsg(_(e_syntax_at), *arg - 1);
|
||||
return FAIL;
|
||||
}
|
||||
if (!valid_yank_reg(**arg, TRUE))
|
||||
if (!valid_yank_reg(**arg, FALSE))
|
||||
{
|
||||
emsg_invreg(**arg);
|
||||
return FAIL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user