Mercurial > vim
comparison src/userfunc.c @ 29759:d19adfd545e2 v9.0.0219
patch 9.0.0219: cannot make a funcref with "s:func" in a def function
Commit: https://github.com/vim/vim/commit/948a3894d98f5e2a6e7fc57189fe9c2a5919eebf
Author: Kota Kato <github@kat0h.com>
Date: Tue Aug 16 16:09:59 2022 +0100
patch 9.0.0219: cannot make a funcref with "s:func" in a def function
Problem: Cannot make a funcref with "s:func" in a def function in legacy
script.
Solution: Allow for using a lower case function name after "s:". (Kota Kato,
closes #10926)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 16 Aug 2022 17:15:03 +0200 |
parents | 9f93092fb3cc |
children | c71a42be2d7f |
comparison
equal
deleted
inserted
replaced
29758:7e306219b233 | 29759:d19adfd545e2 |
---|---|
3993 lead = 0; // do nothing | 3993 lead = 0; // do nothing |
3994 else if (lead > 0 || vim9_local) | 3994 else if (lead > 0 || vim9_local) |
3995 { | 3995 { |
3996 if (!vim9_local) | 3996 if (!vim9_local) |
3997 { | 3997 { |
3998 if (vim9script && lead == 2 && !ASCII_ISUPPER(*lv.ll_name)) | 3998 if (vim9script && lead == 2 && !ASCII_ISUPPER(*lv.ll_name) |
3999 && current_script_is_vim9()) | |
3999 { | 4000 { |
4000 semsg(_(e_function_name_must_start_with_capital_str), start); | 4001 semsg(_(e_function_name_must_start_with_capital_str), start); |
4001 goto theend; | 4002 goto theend; |
4002 } | 4003 } |
4003 lead = 3; | 4004 lead = 3; |