diff src/getchar.c @ 11026:fa69f6272692 v8.0.0402

patch 8.0.0402: :map completion does not have <special> commit https://github.com/vim/vim/commit/cf5fdf7d1689ecb145b634dcb9c6e9fc60f63869 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 2 23:05:51 2017 +0100 patch 8.0.0402: :map completion does not have <special> Problem: :map completion does not have <special>. (Dominique Pelle) Solution: Recognize <special> in completion. Add a test.
author Christian Brabandt <cb@256bit.org>
date Thu, 02 Mar 2017 23:15:05 +0100
parents 27be410d6d29
children f4ea50924c6d
line wrap: on
line diff
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -4216,6 +4216,11 @@ set_context_in_map_cmd(
 		arg = skipwhite(arg + 8);
 		continue;
 	    }
+	    if (STRNCMP(arg, "<special>", 9) == 0)
+	    {
+		arg = skipwhite(arg + 9);
+		continue;
+	    }
 #ifdef FEAT_EVAL
 	    if (STRNCMP(arg, "<script>", 8) == 0)
 	    {
@@ -4267,7 +4272,7 @@ ExpandMappings(
     {
 	count = 0;
 
-	for (i = 0; i < 6; ++i)
+	for (i = 0; i < 7; ++i)
 	{
 	    if (i == 0)
 		p = (char_u *)"<silent>";
@@ -4285,6 +4290,8 @@ ExpandMappings(
 #endif
 	    else if (i == 5)
 		p = (char_u *)"<nowait>";
+	    else if (i == 6)
+		p = (char_u *)"<special>";
 	    else
 		continue;