diff src/ex_docmd.c @ 3503:7e4428115d2c v7.3.514

updated for version 7.3.514 Problem: No completion for :history command. Solution: Add the completion and update the docs. Also fix ":behave" completion. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Mon, 30 Apr 2012 18:48:53 +0200
parents 198ec1fff71a
children 5c1aaf9b4b1b
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3920,8 +3920,16 @@ set_one_cmd_context(xp, buff)
 #endif
 	case CMD_behave:
 	    xp->xp_context = EXPAND_BEHAVE;
+	    xp->xp_pattern = arg;
 	    break;
 
+#if defined(FEAT_CMDHIST)
+	case CMD_history:
+	    xp->xp_context = EXPAND_HISTORY;
+	    xp->xp_pattern = arg;
+	    break;
+#endif
+
 #endif /* FEAT_CMDL_COMPL */
 
 	default:
@@ -5329,6 +5337,7 @@ static struct
 } command_complete[] =
 {
     {EXPAND_AUGROUP, "augroup"},
+    {EXPAND_BEHAVE, "behave"},
     {EXPAND_BUFFERS, "buffer"},
     {EXPAND_COLORS, "color"},
     {EXPAND_COMMANDS, "command"},
@@ -5350,8 +5359,11 @@ static struct
     {EXPAND_FUNCTIONS, "function"},
     {EXPAND_HELP, "help"},
     {EXPAND_HIGHLIGHT, "highlight"},
+#if defined(FEAT_CMDHIST)
+    {EXPAND_HISTORY, "history"},
+#endif
 #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
-        && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
+	&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
     {EXPAND_LOCALES, "locale"},
 #endif
     {EXPAND_MAPPINGS, "mapping"},