updated for version 7.0e07
diff --git a/src/edit.c b/src/edit.c
index 2c97119..b96380e 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -124,6 +124,7 @@
 
 static void ins_ctrl_x __ARGS((void));
 static int  has_compl_option __ARGS((int dict_opt));
+static int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags, int dup));
 static int  ins_compl_equal __ARGS((compl_T *match, char_u *str, int len));
 static void ins_compl_longest_match __ARGS((compl_T *match));
 static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase));
@@ -2076,9 +2077,10 @@
 	/* Copy the original case of the part we typed */
 	STRNCPY(IObuff, compl_orig_text, compl_length);
 
-	return ins_compl_add(IObuff, len, icase, fname, NULL, dir, flags);
+	return ins_compl_add(IObuff, len, icase, fname, NULL, dir,
+								flags, FALSE);
     }
-    return ins_compl_add(str, len, icase, fname, NULL, dir, flags);
+    return ins_compl_add(str, len, icase, fname, NULL, dir, flags, FALSE);
 }
 
 /*
@@ -2087,15 +2089,16 @@
  * NOTDONE, otherwise add it to the list and return OK.  If there is an error,
  * maybe because alloc() returns NULL, then FAIL is returned.
  */
-    int
-ins_compl_add(str, len, icase, fname, cptext, cdir, flags)
+    static int
+ins_compl_add(str, len, icase, fname, cptext, cdir, flags, dup)
     char_u	*str;
     int		len;
     int		icase;
     char_u	*fname;
-    char_u	**cptext;    /* extra text for popup menu or NULL */
+    char_u	**cptext;   /* extra text for popup menu or NULL */
     int		cdir;
     int		flags;
+    int		dup;	    /* accept duplicate match */
 {
     compl_T	*match;
     int		dir = (cdir == 0 ? compl_direction : cdir);
@@ -2109,7 +2112,7 @@
     /*
      * If the same match is already present, don't add it.
      */
-    if (compl_first_match != NULL)
+    if (compl_first_match != NULL && !dup)
     {
 	match = compl_first_match;
 	do
@@ -2301,7 +2304,7 @@
 
     for (i = 0; i < num_matches && add_r != FAIL; i++)
 	if ((add_r = ins_compl_add(matches[i], -1, icase,
-						   NULL, NULL, dir, 0)) == OK)
+					    NULL, NULL, dir, 0, FALSE)) == OK)
 	    /* if dir was BACKWARD then honor it just once */
 	    dir = FORWARD;
     FreeWild(num_matches, matches);
@@ -2359,7 +2362,7 @@
     /* compl_pattern doesn't need to be set */
     compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
     if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
-			       -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT) != OK)
+			-1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
 	return;
 
     /* Handle like dictionary completion. */
@@ -3494,6 +3497,7 @@
 {
     char_u	*word;
     int		icase = p_ic;
+    int		dup = FALSE;
     char_u	*(cptext[CPT_COUNT]);
 
     if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL)
@@ -3509,6 +3513,8 @@
 						     (char_u *)"info", FALSE);
 	if (get_dict_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL)
 	    icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase");
+	if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
+	    dup = get_dict_number(tv->vval.v_dict, (char_u *)"dup");
     }
     else
     {
@@ -3517,7 +3523,7 @@
     }
     if (word == NULL || *word == NUL)
 	return FAIL;
-    return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0);
+    return ins_compl_add(word, -1, icase, NULL, cptext, dir, 0, dup);
 }
 #endif
 
@@ -4616,7 +4622,7 @@
 	vim_free(compl_orig_text);
 	compl_orig_text = vim_strnsave(line + compl_col, compl_length);
 	if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
-			       -1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT) != OK)
+			-1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
 	{
 	    vim_free(compl_pattern);
 	    compl_pattern = NULL;
diff --git a/src/eval.c b/src/eval.c
index 14460a0..0802784 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -587,6 +587,7 @@
 static void f_prevnonblank __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_printf __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_pumvisible __ARGS((typval_T *argvars, typval_T *rettv));
+static void f_pushkeys __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_range __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_readfile __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_reltime __ARGS((typval_T *argvars, typval_T *rettv));
@@ -7101,6 +7102,7 @@
     {"prevnonblank",	1, 1, f_prevnonblank},
     {"printf",		2, 19, f_printf},
     {"pumvisible",	0, 0, f_pumvisible},
+    {"pushkeys",	1, 2, f_pushkeys},
     {"range",		1, 3, f_range},
     {"readfile",	1, 3, f_readfile},
     {"reltime",		0, 2, f_reltime},
@@ -12619,6 +12621,42 @@
 }
 
 /*
+ * "pushkeys()" function
+ */
+/*ARGSUSED*/
+    static void
+f_pushkeys(argvars, rettv)
+    typval_T    *argvars;
+    typval_T    *rettv;
+{
+    int		remap = TRUE;
+    char_u	*keys, *flags;
+    char_u	nbuf[NUMBUFLEN];
+
+    rettv->vval.v_number = 0;
+    keys = get_tv_string(&argvars[0]);
+    if (*keys != NUL)
+    {
+	if (argvars[1].v_type != VAR_UNKNOWN)
+	{
+	    flags = get_tv_string_buf(&argvars[1], nbuf);
+	    for ( ; *flags != NUL; ++flags)
+	    {
+		switch (*flags)
+		{
+		    case 'n': remap = FALSE; break;
+		    case 'm': remap = TRUE; break;
+		}
+	    }
+	}
+
+	ins_typebuf(keys, (remap ? REMAP_YES : REMAP_NONE),
+						 typebuf.tb_len, TRUE, FALSE);
+	typebuf_was_filled = TRUE;
+    }
+}
+
+/*
  * "range()" function
  */
     static void
diff --git a/src/getchar.c b/src/getchar.c
index 782bdbe..89df484 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1034,7 +1034,8 @@
 
 /*
  * Return TRUE if the typeahead buffer was changed (while waiting for a
- * character to arrive).  Happens when a message was received from a client.
+ * character to arrive).  Happens when a message was received from a client or
+ * from pushkeys().
  * But check in a more generic way to avoid trouble: When "typebuf.tb_buf"
  * changed it was reallocated and the old pointer can no longer be used.
  * Or "typebuf.tb_off" may have been changed and we would overwrite characters
@@ -1045,8 +1046,8 @@
     int		tb_change_cnt;	/* old value of typebuf.tb_change_cnt */
 {
     return (tb_change_cnt != 0 && (typebuf.tb_change_cnt != tb_change_cnt
-#ifdef FEAT_CLIENTSERVER
-	    || received_from_client
+#if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
+	    || typebuf_was_filled
 #endif
 	   ));
 }
@@ -1142,10 +1143,10 @@
 	    typebuf.tb_no_abbr_cnt -= len;
     }
 
-#ifdef FEAT_CLIENTSERVER
-    /* Reset the flag that text received from a client was inserted in the
-     * typeahead buffer. */
-    received_from_client = FALSE;
+#if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
+    /* Reset the flag that text received from a client or from pushkeys()
+     * was inserted in the typeahead buffer. */
+    typebuf_was_filled = FALSE;
 #endif
     if (++typebuf.tb_change_cnt == 0)
 	typebuf.tb_change_cnt = 1;
@@ -2917,15 +2918,15 @@
 /*
  * Return TRUE when bytes are in the input buffer or in the typeahead buffer.
  * Normally the input buffer would be sufficient, but the server_to_input_buf()
- * may insert characters in the typeahead buffer while we are waiting for
- * input to arrive.
+ * or pushkeys() may insert characters in the typeahead buffer while we are
+ * waiting for input to arrive.
  */
     int
 input_available()
 {
     return (!vim_is_input_buf_empty()
-# ifdef FEAT_CLIENTSERVER
-	    || received_from_client
+# if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
+	    || typebuf_was_filled
 # endif
 	    );
 }
diff --git a/src/globals.h b/src/globals.h
index 2287116..549287a 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1237,10 +1237,13 @@
 EXTERN int	echo_wid_arg INIT(= FALSE);	/* --echo-wid argument */
 #endif
 
+#if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
+EXTERN int	typebuf_was_filled INIT(= FALSE); /* received text from client
+						     or from pushkeys() */
+#endif
+
 #ifdef FEAT_CLIENTSERVER
 EXTERN char_u	*serverName INIT(= NULL);	/* name of the server */
-EXTERN int	received_from_client INIT(= FALSE);	/* received text from
-							   client */
 # ifdef FEAT_X11
 EXTERN Window	commWindow INIT(= None);
 EXTERN Window	clientWindow INIT(= None);
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 3bec1f5..68c0f3e 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -3198,7 +3198,7 @@
 	    /* The label size apparently doesn't include the spacing, estimate
 	     * it by the page position. */
 	    if (page->allocation.x * 2 + label->allocation.x
-					    + label->allocation.width + 1>= x)
+					   + label->allocation.width + 1 >= x)
 		break;
 	}
 
@@ -3652,6 +3652,7 @@
     gtk_box_pack_start(GTK_BOX(vbox), gui.tabline, FALSE, FALSE, 0);
     gtk_notebook_set_show_border(GTK_NOTEBOOK(gui.tabline), FALSE);
     gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), FALSE);
+    gtk_notebook_set_scrollable(GTK_NOTEBOOK(gui.tabline), TRUE);
 
     {
         GtkWidget *page, *label;
diff --git a/src/main.c b/src/main.c
index 51cd2c7..276547b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -3629,7 +3629,7 @@
 
 	/* Let input_available() know we inserted text in the typeahead
 	 * buffer. */
-	received_from_client = TRUE;
+	typebuf_was_filled = TRUE;
     }
     vim_free((char_u *)ptr);
 }
diff --git a/src/os_mac.h b/src/os_mac.h
index 22fd164..6effe10 100644
--- a/src/os_mac.h
+++ b/src/os_mac.h
@@ -23,7 +23,7 @@
  * files have many conflicts).
  */
 #ifndef FEAT_X11
-# include <QuickDraw.h>
+# include <Quickdraw.h>	    /* Apple calls it QuickDraw.h... */
 # include <ToolUtils.h>
 # include <LowMem.h>
 # include <Scrap.h>
diff --git a/src/proto/edit.pro b/src/proto/edit.pro
index 819cc02..a967037 100644
--- a/src/proto/edit.pro
+++ b/src/proto/edit.pro
@@ -1,42 +1,41 @@
 /* edit.c */
-extern int edit __ARGS((int cmdchar, int startln, long count));
-extern void edit_putchar __ARGS((int c, int highlight));
-extern void edit_unputchar __ARGS((void));
-extern void display_dollar __ARGS((colnr_T col));
-extern void change_indent __ARGS((int type, int amount, int round, int replaced));
-extern void truncate_spaces __ARGS((char_u *line));
-extern void backspace_until_column __ARGS((int col));
-extern int vim_is_ctrl_x_key __ARGS((int c));
-extern int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags));
-extern int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u **cptext, int cdir, int flags));
-extern void set_completion __ARGS((int startcol, list_T *list));
-extern void ins_compl_show_pum __ARGS((void));
-extern char_u *find_word_start __ARGS((char_u *ptr));
-extern char_u *find_word_end __ARGS((char_u *ptr));
-extern int ins_compl_active __ARGS((void));
-extern int ins_compl_add_tv __ARGS((typval_T *tv, int dir));
-extern void ins_compl_check_keys __ARGS((int frequency));
-extern int get_literal __ARGS((void));
-extern void insertchar __ARGS((int c, int flags, int second_indent));
-extern void auto_format __ARGS((int trailblank, int prev_line));
-extern int comp_textwidth __ARGS((int ff));
-extern int stop_arrow __ARGS((void));
-extern void set_last_insert __ARGS((int c));
-extern void free_last_insert __ARGS((void));
-extern char_u *add_char2buf __ARGS((int c, char_u *s));
-extern void beginline __ARGS((int flags));
-extern int oneright __ARGS((void));
-extern int oneleft __ARGS((void));
-extern int cursor_up __ARGS((long n, int upd_topline));
-extern int cursor_down __ARGS((long n, int upd_topline));
-extern int stuff_inserted __ARGS((int c, long count, int no_esc));
-extern char_u *get_last_insert __ARGS((void));
-extern char_u *get_last_insert_save __ARGS((void));
-extern void replace_push __ARGS((int c));
-extern void fixthisline __ARGS((int (*get_the_indent)(void)));
-extern void fix_indent __ARGS((void));
-extern int in_cinkeys __ARGS((int keytyped, int when, int line_is_empty));
-extern int hkmap __ARGS((int c));
-extern void ins_scroll __ARGS((void));
-extern void ins_horscroll __ARGS((void));
+int edit __ARGS((int cmdchar, int startln, long count));
+void edit_putchar __ARGS((int c, int highlight));
+void edit_unputchar __ARGS((void));
+void display_dollar __ARGS((colnr_T col));
+void change_indent __ARGS((int type, int amount, int round, int replaced));
+void truncate_spaces __ARGS((char_u *line));
+void backspace_until_column __ARGS((int col));
+int vim_is_ctrl_x_key __ARGS((int c));
+int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags));
+void set_completion __ARGS((int startcol, list_T *list));
+void ins_compl_show_pum __ARGS((void));
+char_u *find_word_start __ARGS((char_u *ptr));
+char_u *find_word_end __ARGS((char_u *ptr));
+int ins_compl_active __ARGS((void));
+int ins_compl_add_tv __ARGS((typval_T *tv, int dir));
+void ins_compl_check_keys __ARGS((int frequency));
+int get_literal __ARGS((void));
+void insertchar __ARGS((int c, int flags, int second_indent));
+void auto_format __ARGS((int trailblank, int prev_line));
+int comp_textwidth __ARGS((int ff));
+int stop_arrow __ARGS((void));
+void set_last_insert __ARGS((int c));
+void free_last_insert __ARGS((void));
+char_u *add_char2buf __ARGS((int c, char_u *s));
+void beginline __ARGS((int flags));
+int oneright __ARGS((void));
+int oneleft __ARGS((void));
+int cursor_up __ARGS((long n, int upd_topline));
+int cursor_down __ARGS((long n, int upd_topline));
+int stuff_inserted __ARGS((int c, long count, int no_esc));
+char_u *get_last_insert __ARGS((void));
+char_u *get_last_insert_save __ARGS((void));
+void replace_push __ARGS((int c));
+void fixthisline __ARGS((int (*get_the_indent)(void)));
+void fix_indent __ARGS((void));
+int in_cinkeys __ARGS((int keytyped, int when, int line_is_empty));
+int hkmap __ARGS((int c));
+void ins_scroll __ARGS((void));
+void ins_horscroll __ARGS((void));
 /* vim: set ft=c : */
diff --git a/src/version.h b/src/version.h
index ef0ff31..e4bc3f6 100644
--- a/src/version.h
+++ b/src/version.h
@@ -35,6 +35,6 @@
  */
 #define VIM_VERSION_NODOT	"vim70e"
 #define VIM_VERSION_SHORT	"7.0e"
-#define VIM_VERSION_MEDIUM	"7.0e06 BETA"
-#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0e06 BETA (2006 Apr 22)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0e06 BETA (2006 Apr 22, compiled "
+#define VIM_VERSION_MEDIUM	"7.0e07 BETA"
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0e07 BETA (2006 Apr 23)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0e07 BETA (2006 Apr 23, compiled "