Mercurial > vim
comparison src/evalvars.c @ 27970:212c5894b8b1 v8.2.4510
patch 8.2.4510: Vim9: shortening commands leads to confusing script
Commit: https://github.com/vim/vim/commit/204852ae2adfdde10c656ca7f14e5b4207a69172
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 5 12:56:44 2022 +0000
patch 8.2.4510: Vim9: shortening commands leads to confusing script
Problem: Vim9: shortening commands leads to confusing script.
Solution: In Vim9 script require at least ":cont" for ":continue", "const"
instead of "cons", "break" instead of "brea", "catch" instead of
"cat", "else" instead of "el" "elseif" instead of "elsei" "endfor"
instead of "endfo" "endif" instead of "en" "endtry" instead of
"endt", "finally" instead of "fina", "throw" instead of "th",
"while" instead of "wh".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Mar 2022 14:00:03 +0100 |
parents | 40c6e5f849dc |
children | 1012048eed26 |
comparison
equal
deleted
inserted
replaced
27969:0e58183b329e | 27970:212c5894b8b1 |
---|---|
766 if (current_sctx.sc_sid == 0 && has_var) | 766 if (current_sctx.sc_sid == 0 && has_var) |
767 { | 767 { |
768 emsg(_(e_cannot_declare_variable_on_command_line)); | 768 emsg(_(e_cannot_declare_variable_on_command_line)); |
769 return; | 769 return; |
770 } | 770 } |
771 if (eap->arg > eap->cmd && !has_var) | |
772 { | |
773 emsg(_(e_must_use_var_instead_of_va)); | |
774 return; | |
775 } | |
776 ex_let(eap); | 771 ex_let(eap); |
777 } | 772 } |
778 | 773 |
779 /* | 774 /* |
780 * ":let" list all variable values | 775 * ":let" list all variable values |