aboutsummaryrefslogtreecommitdiff
path: root/scripts/lintcommit.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-03-28 18:51:00 +0800
committerGitHub <noreply@github.com>2026-03-28 18:51:00 +0800
commit5a7df03b428f2ca1049973e102d0782d33845ac9 (patch)
treeaedf7aea36d796e3816375f5fb28da4b8c9fe278 /scripts/lintcommit.lua
parent9383a096eb7eef0693505508a0414dd3ff2221eb (diff)
downloadrneovim-5a7df03b428f2ca1049973e102d0782d33845ac9.tar.gz
rneovim-5a7df03b428f2ca1049973e102d0782d33845ac9.tar.bz2
rneovim-5a7df03b428f2ca1049973e102d0782d33845ac9.zip
vim-patch:9.2.0265: unnecessary restrictions for defining dictionary function names (#38524)
Problem: unnecessary restrictions for defining dictionary function names Solution: Allow defining dict function with bracket key that is not a valid identifier (thinca) In Vim script, "function obj.func()" and "function obj['func']()" both define a dictionary function. However, the bracket form required the key to match function naming rules (eval_isnamec), so "function obj['foo-bar']()" failed with E475. Assigning and calling already work: "let obj['foo-bar'] = obj.func" and "call obj['foo-bar']()" are valid. Only the definition was incorrectly restricted. Skip the identifier check when the name comes from fd_newkey (i.e. the key was given in bracket notation). Dictionary keys may be any string. Supported by AI closes: vim/vim#19833 https://github.com/vim/vim/commit/f89662722d3c4b97d55f32ca88a895f246405059 Co-authored-by: thinca <thinca@gmail.com>
Diffstat (limited to 'scripts/lintcommit.lua')
0 files changed, 0 insertions, 0 deletions