diff src/vim9compile.c @ 23980:bee8c78c0c6a v8.2.2532

patch 8.2.2532: Vim9: confusing error if :k is used with a range Commit: https://github.com/vim/vim/commit/ada1d870b4a818151cfba1c18962af2369b88df9 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 20 08:16:51 2021 +0100 patch 8.2.2532: Vim9: confusing error if :k is used with a range Problem: Vim9: confusing error if :k is used with a range. Solution: Give an error about the range. (issue https://github.com/vim/vim/issues/7874)
author Bram Moolenaar <Bram@vim.org>
date Sat, 20 Feb 2021 08:30:03 +0100
parents 54b2aa1f0d42
children 9fcd71d0db89
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -8330,6 +8330,7 @@ compile_def_function(
 		    semsg(_(e_colon_required_before_range_str), cmd);
 		    goto erret;
 		}
+		ea.addr_count = 1;
 		if (ends_excmd2(line, ea.cmd))
 		{
 		    // A range without a command: jump to the line.