mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
vim-patch:1b884a005398
Update runtime files.
1b884a0053
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
3
runtime/doc/builtin.txt
generated
3
runtime/doc/builtin.txt
generated
@@ -4210,7 +4210,8 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()*
|
|||||||
mapnew({expr1}, {expr2}) *mapnew()*
|
mapnew({expr1}, {expr2}) *mapnew()*
|
||||||
Like |map()| but instead of replacing items in {expr1} a new
|
Like |map()| but instead of replacing items in {expr1} a new
|
||||||
List or Dictionary is created and returned. {expr1} remains
|
List or Dictionary is created and returned. {expr1} remains
|
||||||
unchanged.
|
unchanged. Items can still be changed by {expr2}, if you
|
||||||
|
don't want that use |deepcopy()| first.
|
||||||
|
|
||||||
mapset({mode}, {abbr}, {dict}) *mapset()*
|
mapset({mode}, {abbr}, {dict}) *mapset()*
|
||||||
Restore a mapping from a dictionary returned by |maparg()|.
|
Restore a mapping from a dictionary returned by |maparg()|.
|
||||||
|
3
runtime/lua/vim/_meta/vimfn.lua
generated
3
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -5082,7 +5082,8 @@ function vim.fn.mapcheck(name, mode, abbr) end
|
|||||||
|
|
||||||
--- Like |map()| but instead of replacing items in {expr1} a new
|
--- Like |map()| but instead of replacing items in {expr1} a new
|
||||||
--- List or Dictionary is created and returned. {expr1} remains
|
--- List or Dictionary is created and returned. {expr1} remains
|
||||||
--- unchanged.
|
--- unchanged. Items can still be changed by {expr2}, if you
|
||||||
|
--- don't want that use |deepcopy()| first.
|
||||||
---
|
---
|
||||||
--- @param expr1 any
|
--- @param expr1 any
|
||||||
--- @param expr2 any
|
--- @param expr2 any
|
||||||
|
@@ -6223,7 +6223,8 @@ M.funcs = {
|
|||||||
desc = [=[
|
desc = [=[
|
||||||
Like |map()| but instead of replacing items in {expr1} a new
|
Like |map()| but instead of replacing items in {expr1} a new
|
||||||
List or Dictionary is created and returned. {expr1} remains
|
List or Dictionary is created and returned. {expr1} remains
|
||||||
unchanged.
|
unchanged. Items can still be changed by {expr2}, if you
|
||||||
|
don't want that use |deepcopy()| first.
|
||||||
]=],
|
]=],
|
||||||
name = 'mapnew',
|
name = 'mapnew',
|
||||||
params = { { 'expr1', 'any' }, { 'expr2', 'any' } },
|
params = { { 'expr1', 'any' }, { 'expr2', 'any' } },
|
||||||
|
@@ -88,7 +88,7 @@ endfunc
|
|||||||
" Execute "lines" in a legacy function, translated as in
|
" Execute "lines" in a legacy function, translated as in
|
||||||
" CheckLegacyAndVim9Success()
|
" CheckLegacyAndVim9Success()
|
||||||
func CheckTransLegacySuccess(lines)
|
func CheckTransLegacySuccess(lines)
|
||||||
let legacylines = a:lines->deepcopy()->map({_, v ->
|
let legacylines = a:lines->mapnew({_, v ->
|
||||||
\ v->substitute('\<VAR\>', 'let', 'g')
|
\ v->substitute('\<VAR\>', 'let', 'g')
|
||||||
\ ->substitute('\<LET\>', 'let', 'g')
|
\ ->substitute('\<LET\>', 'let', 'g')
|
||||||
\ ->substitute('\<LSTART\>', '{', 'g')
|
\ ->substitute('\<LSTART\>', '{', 'g')
|
||||||
@@ -131,7 +131,7 @@ func CheckLegacyAndVim9Failure(lines, error)
|
|||||||
let legacyError = a:error[0]
|
let legacyError = a:error[0]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let legacylines = a:lines->deepcopy()->map({_, v ->
|
let legacylines = a:lines->mapnew({_, v ->
|
||||||
\ v->substitute('\<VAR\>', 'let', 'g')
|
\ v->substitute('\<VAR\>', 'let', 'g')
|
||||||
\ ->substitute('\<LET\>', 'let', 'g')
|
\ ->substitute('\<LET\>', 'let', 'g')
|
||||||
\ ->substitute('#"', ' "', 'g')
|
\ ->substitute('#"', ' "', 'g')
|
||||||
|
Reference in New Issue
Block a user