patch 8.2.2531: Vim9: the :k command is obscure
Problem: Vim9: the :k command is obscure.
Solution: Disallow using :k, can use :mark instead. (closes #7874)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 371f3d6..77162ec 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3461,7 +3461,8 @@
/*
* Isolate the command and search for it in the command table.
* Exceptions:
- * - the 'k' command can directly be followed by any character.
+ * - The 'k' command can directly be followed by any character.
+ * But it is not used in Vim9 script.
* - the 's' command can be followed directly by 'c', 'g', 'i', 'I' or 'r'
* but :sre[wind] is another command, as are :scr[iptnames],
* :scs[cope], :sim[alt], :sig[ns] and :sil[ent].
@@ -8056,6 +8057,10 @@
{
pos_T pos;
+#ifdef FEAT_EVAL
+ if (not_in_vim9(eap) == FAIL)
+ return;
+#endif
if (*eap->arg == NUL) // No argument?
emsg(_(e_argreq));
else if (eap->arg[1] != NUL) // more than one character?