diff --git a/src/edit.c b/src/edit.c
index 39fc0ee..30eece2 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -244,7 +244,6 @@
     int		lastc;
     colnr_T	mincol;
     static linenr_T o_lnum = 0;
-    static int	o_eol = FALSE;
     int		i;
     int		did_backspace = TRUE;	    /* previous char was backspace */
 #ifdef FEAT_CINDENT
@@ -426,7 +425,7 @@
 	 */
 	validate_virtcol();
 	update_curswant();
-	if (((o_eol && curwin->w_cursor.lnum == o_lnum)
+	if (((ins_at_eol && curwin->w_cursor.lnum == o_lnum)
 		    || curwin->w_curswant > curwin->w_virtcol)
 		&& *(ptr = ml_get_curline() + curwin->w_cursor.col) != NUL)
 	{
@@ -441,7 +440,7 @@
 	    }
 #endif
 	}
-	o_eol = FALSE;
+	ins_at_eol = FALSE;
     }
     else
 	arrow_used = FALSE;
@@ -713,11 +712,9 @@
 	    switch (c)
 	    {
 		case K_LEFT:	c = K_RIGHT; break;
-		case K_XLEFT:	c = K_XRIGHT; break;
 		case K_S_LEFT:	c = K_S_RIGHT; break;
 		case K_C_LEFT:	c = K_C_RIGHT; break;
 		case K_RIGHT:	c = K_LEFT; break;
-		case K_XRIGHT:	c = K_XLEFT; break;
 		case K_S_RIGHT: c = K_S_LEFT; break;
 		case K_C_RIGHT: c = K_C_LEFT; break;
 	    }
@@ -816,10 +813,10 @@
 		restart_edit = 'I';
 #ifdef FEAT_VIRTUALEDIT
 	    if (virtual_active())
-		o_eol = FALSE;	    /* cursor always keeps its column */
+		ins_at_eol = FALSE;	/* cursor always keeps its column */
 	    else
 #endif
-		o_eol = (gchar_cursor() == NUL);
+		ins_at_eol = (gchar_cursor() == NUL);
 	    goto doESCkey;
 
 #ifdef FEAT_SNIFF
@@ -888,7 +885,7 @@
 #endif
 	    /* Always update o_lnum, so that a "CTRL-O ." that adds a line
 	     * still puts the cursor back after the inserted text. */
-	    if (o_eol && gchar_cursor() == NUL)
+	    if (ins_at_eol && gchar_cursor() == NUL)
 		o_lnum = curwin->w_cursor.lnum;
 
 	    if (ins_esc(&count, cmdchar))
@@ -1098,7 +1095,6 @@
 
 	case K_HOME:
 	case K_KHOME:
-	case K_XHOME:
 	case K_S_HOME:
 	case K_C_HOME:
 	    ins_home(c);
@@ -1106,14 +1102,12 @@
 
 	case K_END:
 	case K_KEND:
-	case K_XEND:
 	case K_S_END:
 	case K_C_END:
 	    ins_end(c);
 	    break;
 
 	case K_LEFT:
-	case K_XLEFT:
 	    if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL))
 		ins_s_left();
 	    else
@@ -1126,7 +1120,6 @@
 	    break;
 
 	case K_RIGHT:
-	case K_XRIGHT:
 	    if (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL))
 		ins_s_right();
 	    else
@@ -1139,7 +1132,6 @@
 	    break;
 
 	case K_UP:
-	case K_XUP:
 	    if (mod_mask & MOD_MASK_SHIFT)
 		ins_pageup();
 	    else
@@ -1153,7 +1145,6 @@
 	    break;
 
 	case K_DOWN:
-	case K_XDOWN:
 	    if (mod_mask & MOD_MASK_SHIFT)
 		ins_pagedown();
 	    else
@@ -6243,14 +6234,12 @@
     {
 	/* CTRL-G k and CTRL-G <Up>: cursor up to Insstart.col */
 	case K_UP:
-	case K_XUP:
 	case Ctrl_K:
 	case 'k': ins_up(TRUE);
 		  break;
 
 	/* CTRL-G j and CTRL-G <Down>: cursor down to Insstart.col */
 	case K_DOWN:
-	case K_XDOWN:
 	case Ctrl_J:
 	case 'j': ins_down(TRUE);
 		  break;
@@ -6473,17 +6462,11 @@
 	switch (c)
 	{
 	    case K_KHOME:
-	    case K_XHOME:
 	    case K_KEND:
-	    case K_XEND:
 	    case K_PAGEUP:
 	    case K_KPAGEUP:
 	    case K_PAGEDOWN:
 	    case K_KPAGEDOWN:
-	    case K_XLEFT:
-	    case K_XRIGHT:
-	    case K_XUP:
-	    case K_XDOWN:
 # ifdef MACOS
 	    case K_LEFT:
 	    case K_RIGHT:
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 53bff75..a71b68e 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -326,11 +326,9 @@
 		switch (c)
 		{
 		    case K_RIGHT:   c = K_LEFT; break;
-		    case K_XRIGHT:  c = K_XLEFT; break;
 		    case K_S_RIGHT: c = K_S_LEFT; break;
 		    case K_C_RIGHT: c = K_C_LEFT; break;
 		    case K_LEFT:    c = K_RIGHT; break;
-		    case K_XLEFT:   c = K_XRIGHT; break;
 		    case K_S_LEFT:  c = K_S_RIGHT; break;
 		    case K_C_LEFT:  c = K_C_RIGHT; break;
 		}
@@ -363,10 +361,10 @@
 	 * list */
 	if (lookfor != NULL
 		&& c != K_S_DOWN && c != K_S_UP
-		&& c != K_DOWN && c != K_UP && c != K_XDOWN && c != K_XUP
+		&& c != K_DOWN && c != K_UP
 		&& c != K_PAGEDOWN && c != K_PAGEUP
 		&& c != K_KPAGEDOWN && c != K_KPAGEUP
-		&& c != K_LEFT && c != K_RIGHT && c != K_XLEFT && c != K_XRIGHT
+		&& c != K_LEFT && c != K_RIGHT
 		&& (xpc.xp_numfiles > 0 || (c != Ctrl_P && c != Ctrl_N)))
 	{
 	    vim_free(lookfor);
@@ -384,9 +382,9 @@
 	/* Special translations for 'wildmenu' */
 	if (did_wild_list && p_wmnu)
 	{
-	    if (c == K_LEFT || c == K_XLEFT)
+	    if (c == K_LEFT)
 		c = Ctrl_P;
-	    else if (c == K_RIGHT || c == K_XRIGHT)
+	    else if (c == K_RIGHT)
 		c = Ctrl_N;
 	}
 	/* Hitting CR after "emenu Name.": complete submenu */
@@ -407,8 +405,7 @@
 	    (void)ExpandOne(&xpc, NULL, NULL, 0, WILD_FREE);
 	    did_wild_list = FALSE;
 #ifdef FEAT_WILDMENU
-	    if (!p_wmnu || (c != K_UP && c != K_DOWN
-					       && c != K_XUP && c != K_XDOWN))
+	    if (!p_wmnu || (c != K_UP && c != K_DOWN))
 #endif
 		xpc.xp_context = EXPAND_NOTHING;
 	    wim_index = 0;
@@ -455,10 +452,9 @@
 	if (xpc.xp_context == EXPAND_MENUNAMES && p_wmnu)
 	{
 	    /* Hitting <Down> after "emenu Name.": complete submenu */
-	    if (ccline.cmdbuff[ccline.cmdpos - 1] == '.'
-					     && (c == K_DOWN || c == K_XDOWN))
+	    if (ccline.cmdbuff[ccline.cmdpos - 1] == '.' && c == K_DOWN)
 		c = p_wc;
-	    else if (c == K_UP || c == K_XUP)
+	    else if (c == K_UP)
 	    {
 		/* Hitting <Up>: Remove one submenu name in front of the
 		 * cursor */
@@ -505,15 +501,14 @@
 	    upseg[4] = NUL;
 
 	    if (ccline.cmdbuff[ccline.cmdpos - 1] == PATHSEP
-		    && (c == K_DOWN || c == K_XDOWN)
+		    && c == K_DOWN
 		    && (ccline.cmdbuff[ccline.cmdpos - 2] != '.'
 			|| ccline.cmdbuff[ccline.cmdpos - 3] != '.'))
 	    {
 		/* go down a directory */
 		c = p_wc;
 	    }
-	    else if (STRNCMP(xpc.xp_pattern, upseg + 1, 3) == 0
-					     && (c == K_DOWN || c == K_XDOWN))
+	    else if (STRNCMP(xpc.xp_pattern, upseg + 1, 3) == 0 && c == K_DOWN)
 	    {
 		/* If in a direct ancestor, strip off one ../ to go down */
 		int found = FALSE;
@@ -541,7 +536,7 @@
 		    c = p_wc;
 		}
 	    }
-	    else if (c == K_UP || c == K_XUP)
+	    else if (c == K_UP)
 	    {
 		/* go up a directory */
 		int found = FALSE;
@@ -1107,7 +1102,6 @@
 		continue;	/* don't do incremental search now */
 
 	case K_RIGHT:
-	case K_XRIGHT:
 	case K_S_RIGHT:
 	case K_C_RIGHT:
 		do
@@ -1136,7 +1130,6 @@
 		goto cmdline_not_changed;
 
 	case K_LEFT:
-	case K_XLEFT:
 	case K_S_LEFT:
 	case K_C_LEFT:
 		do
@@ -1296,7 +1289,6 @@
 	case Ctrl_B:	    /* begin of command line */
 	case K_HOME:
 	case K_KHOME:
-	case K_XHOME:
 	case K_S_HOME:
 	case K_C_HOME:
 		ccline.cmdpos = 0;
@@ -1306,7 +1298,6 @@
 	case Ctrl_E:	    /* end of command line */
 	case K_END:
 	case K_KEND:
-	case K_XEND:
 	case K_S_END:
 	case K_C_END:
 		ccline.cmdpos = ccline.cmdlen;
@@ -1335,9 +1326,7 @@
 
 #ifdef FEAT_CMDHIST
 	case K_UP:
-	case K_XUP:
 	case K_DOWN:
-	case K_XDOWN:
 	case K_S_UP:
 	case K_S_DOWN:
 	case K_PAGEUP:
@@ -1361,7 +1350,7 @@
 		for (;;)
 		{
 		    /* one step backwards */
-		    if (c == K_UP || c == K_XUP || c == K_S_UP || c == Ctrl_P
+		    if (c == K_UP|| c == K_S_UP || c == Ctrl_P
 			    || c == K_PAGEUP || c == K_KPAGEUP)
 		    {
 			if (hiscnt == hislen)	/* first time */
@@ -1398,7 +1387,7 @@
 			hiscnt = i;
 			break;
 		    }
-		    if ((c != K_UP && c != K_DOWN && c != K_XUP && c != K_XDOWN)
+		    if ((c != K_UP && c != K_DOWN)
 			    || hiscnt == i
 			    || STRNCMP(history[histype][hiscnt].hisstr,
 						    lookfor, (size_t)j) == 0)
diff --git a/src/globals.h b/src/globals.h
index af4eed0..81c1f7e 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -63,7 +63,7 @@
 
 /*
  * When vgetc() is called, it sets mod_mask to the set of modifiers that are
- * held down based on the KSMOD_* symbols that are read first.
+ * held down based on the MOD_MASK_* symbols that are read first.
  */
 EXTERN int	mod_mask INIT(= 0x0);		/* current key modifiers */
 
@@ -806,6 +806,8 @@
 					 * hitting cursor key in insert mode.
 					 * Used by vgetorpeek() to decide when
 					 * to call u_sync() */
+EXTERN int	ins_at_eol INIT(= FALSE); /* put cursor after eol when
+					   restarting edit after CTRL-O */
 #ifdef FEAT_INS_EXPAND
 EXTERN char_u	*edit_submode INIT(= NULL); /* msg for CTRL-X submode */
 EXTERN char_u	*edit_submode_pre INIT(= NULL); /* prepended to edit_submode */
diff --git a/src/keymap.h b/src/keymap.h
index 35bc9b3..96e8804 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -206,7 +206,9 @@
     , KE_XF3
     , KE_XF4
     , KE_XEND		/* extra (vt100) end key for xterm */
+    , KE_ZEND		/* extra (vt100) end key for xterm */
     , KE_XHOME		/* extra (vt100) home key for xterm */
+    , KE_ZHOME		/* extra (vt100) home key for xterm */
     , KE_XUP		/* extra vt100 cursor keys for xterm */
     , KE_XDOWN
     , KE_XLEFT
@@ -381,9 +383,11 @@
 #define K_HOME		TERMCAP2KEY('k', 'h')
 #define K_KHOME		TERMCAP2KEY('K', '1')	/* keypad home (upper left) */
 #define K_XHOME		TERMCAP2KEY(KS_EXTRA, KE_XHOME)
+#define K_ZHOME		TERMCAP2KEY(KS_EXTRA, KE_ZHOME)
 #define K_END		TERMCAP2KEY('@', '7')
 #define K_KEND		TERMCAP2KEY('K', '4')	/* keypad end (lower left) */
 #define K_XEND		TERMCAP2KEY(KS_EXTRA, KE_XEND)
+#define K_ZEND		TERMCAP2KEY(KS_EXTRA, KE_ZEND)
 #define K_PAGEUP	TERMCAP2KEY('k', 'P')
 #define K_PAGEDOWN	TERMCAP2KEY('k', 'N')
 #define K_KPAGEUP	TERMCAP2KEY('K', '3')	/* keypad pageup (upper R.) */
@@ -407,13 +411,6 @@
 #define K_K8		TERMCAP2KEY('K', 'K')	/* keypad 8 */
 #define K_K9		TERMCAP2KEY('K', 'L')	/* keypad 9 */
 
-/*
- * These are used to recognize a keypad key that does have an ASCII equivalent.
- * Since the values are negative, it's the other way around.
- */
-#define FIRST_KEYPAD	K_K9
-#define LAST_KEYPAD	K_KPLUS
-
 #define K_MOUSE		TERMCAP2KEY(KS_MOUSE, KE_FILLER)
 #define K_MENU		TERMCAP2KEY(KS_MENU, KE_FILLER)
 #define K_VER_SCROLLBAR	TERMCAP2KEY(KS_VER_SCROLLBAR, KE_FILLER)
diff --git a/src/misc2.c b/src/misc2.c
index ebf3933..c895207 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1843,9 +1843,11 @@
     {K_HOME,		(char_u *)"Home"},
     {K_KHOME,		(char_u *)"kHome"},
     {K_XHOME,		(char_u *)"xHome"},
+    {K_ZHOME,		(char_u *)"zHome"},
     {K_END,		(char_u *)"End"},
     {K_KEND,		(char_u *)"kEnd"},
     {K_XEND,		(char_u *)"xEnd"},
+    {K_ZEND,		(char_u *)"zEnd"},
     {K_PAGEUP,		(char_u *)"PageUp"},
     {K_PAGEDOWN,	(char_u *)"PageDown"},
     {K_KPAGEUP,		(char_u *)"kPageUp"},
@@ -1999,8 +2001,6 @@
 
 /*
  * Change <xHome> to <Home>, <xUp> to <Up>, etc.
- * "kp" must point to an array that holds the two characters that represent a
- * special key.
  */
     int
 handle_x_keys(key)
@@ -2013,7 +2013,9 @@
 	case K_XLEFT:	return K_LEFT;
 	case K_XRIGHT:	return K_RIGHT;
 	case K_XHOME:	return K_HOME;
+	case K_ZHOME:	return K_HOME;
 	case K_XEND:	return K_END;
+	case K_ZEND:	return K_END;
 	case K_XF1:	return K_F1;
 	case K_XF2:	return K_F2;
 	case K_XF3:	return K_F3;
diff --git a/src/proto/eval.pro b/src/proto/eval.pro
index 023f422..13bd82a 100644
--- a/src/proto/eval.pro
+++ b/src/proto/eval.pro
@@ -39,6 +39,8 @@
 int list_append_dict __ARGS((list_T *list, dict_T *dict));
 dict_T *dict_alloc __ARGS((void));
 int dict_add_nr_str __ARGS((dict_T *d, char *key, long nr, char_u *str));
+char_u *get_dict_string __ARGS((dict_T *d, char_u *key));
+long get_dict_number __ARGS((dict_T *d, char_u *key));
 char_u *get_function_name __ARGS((expand_T *xp, int idx));
 char_u *get_expr_name __ARGS((expand_T *xp, int idx));
 void set_vim_var_nr __ARGS((int idx, long val));
diff --git a/src/quickfix.c b/src/quickfix.c
index c34f47f..a4c016e 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -24,22 +24,24 @@
 static struct dir_stack_T   *dir_stack = NULL;
 
 /*
- * for each error the next struct is allocated and linked in a list
+ * For each error the next struct is allocated and linked in a list.
  */
-struct qf_line
+typedef struct qfline_S qfline_T;
+struct qfline_S
 {
-    struct qf_line  *qf_next;	/* pointer to next error in the list */
-    struct qf_line  *qf_prev;	/* pointer to previous error in the list */
-    linenr_T	     qf_lnum;	/* line number where the error occurred */
-    int		     qf_fnum;	/* file number for the line */
-    int		     qf_col;	/* column where the error occurred */
-    int		     qf_nr;	/* error number */
-    char_u	    *qf_text;	/* description of the error */
-    char_u	     qf_viscol; /* set to TRUE if qf_col is screen column */
-    char_u	     qf_cleared;/* set to TRUE if line has been deleted */
-    char_u	     qf_type;	/* type of the error (mostly 'E'); 1 for
+    qfline_T	*qf_next;	/* pointer to next error in the list */
+    qfline_T	*qf_prev;	/* pointer to previous error in the list */
+    linenr_T	qf_lnum;	/* line number where the error occurred */
+    int		qf_fnum;	/* file number for the line */
+    int		qf_col;		/* column where the error occurred */
+    int		qf_nr;		/* error number */
+    char_u	*qf_pattern;	/* search pattern for the error */
+    char_u	*qf_text;	/* description of the error */
+    char_u	qf_viscol;	/* set to TRUE if qf_col is screen column */
+    char_u	qf_cleared;	/* set to TRUE if line has been deleted */
+    char_u	qf_type;	/* type of the error (mostly 'E'); 1 for
 				   :helpgrep */
-    char_u	     qf_valid;	/* valid error message detected */
+    char_u	qf_valid;	/* valid error message detected */
 };
 
 /*
@@ -49,17 +51,17 @@
 
 struct qf_list
 {
-    struct qf_line *qf_start;	/* pointer to the first error */
-    struct qf_line *qf_ptr;	/* pointer to the current error */
-    int  qf_count;		/* number of errors (0 means no error list) */
-    int  qf_index;		/* current index in the error list */
-    int  qf_nonevalid;		/* TRUE if not a single valid entry found */
+    qfline_T	*qf_start;	/* pointer to the first error */
+    qfline_T	*qf_ptr;	/* pointer to the current error */
+    int		qf_count;	/* number of errors (0 means no error list) */
+    int		qf_index;	/* current index in the error list */
+    int		qf_nonevalid;	/* TRUE if not a single valid entry found */
 } qf_lists[LISTCOUNT];
 
 static int	qf_curlist = 0;	/* current error list */
 static int	qf_listcount = 0;   /* current number of lists */
 
-#define FMT_PATTERNS 9		/* maximum number of % recognized */
+#define FMT_PATTERNS 10		/* maximum number of % recognized */
 
 /*
  * Structure used to hold the info of one part of 'errorformat'
@@ -88,7 +90,7 @@
 
 static int qf_init_ext __ARGS((char_u *efile, buf_T *buf, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast));
 static void	qf_new_list __ARGS((void));
-static int	qf_add_entry __ARGS((struct qf_line **prevp, char_u *dir, char_u *fname, char_u *mesg, long lnum, int col, int vis_col, int nr, int type, int valid));
+static int	qf_add_entry __ARGS((qfline_T **prevp, char_u *dir, char_u *fname, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid));
 static void	qf_msg __ARGS((void));
 static void	qf_free __ARGS((int idx));
 static char_u	*qf_types __ARGS((int, int));
@@ -145,6 +147,7 @@
 {
     char_u	    *namebuf;
     char_u	    *errmsg;
+    char_u	    *pattern;
     char_u	    *fmtstr = NULL;
     int		    col = 0;
     char_u	    use_viscol = FALSE;
@@ -154,7 +157,7 @@
     long	    lnum = 0L;
     int		    enr = 0;
     FILE	    *fd = NULL;
-    struct qf_line  *qfprev = NULL;	/* init to make SASC shut up */
+    qfline_T	    *qfprev = NULL;	/* init to make SASC shut up */
     char_u	    *efmp;
     struct eformat  *fmt_first = NULL;
     struct eformat  *fmt_last = NULL;
@@ -189,12 +192,14 @@
 			{'m', ".\\+"},
 			{'r', ".*"},
 			{'p', "[- .]*"},
-			{'v', "\\d\\+"}
+			{'v', "\\d\\+"},
+			{'s', ".\\+"}
 		    };
 
     namebuf = alloc(CMDBUFFSIZE + 1);
     errmsg = alloc(CMDBUFFSIZE + 1);
-    if (namebuf == NULL || errmsg == NULL)
+    pattern = alloc(CMDBUFFSIZE + 1);
+    if (namebuf == NULL || errmsg == NULL || pattern == NULL)
 	goto qf_init_end;
 
     if (efile != NULL && (fd = mch_fopen((char *)efile, "r")) == NULL)
@@ -463,6 +468,7 @@
 	    if (multiscan && vim_strchr((char_u *)"OPQ", idx) == NULL)
 		continue;
 	    namebuf[0] = NUL;
+	    pattern[0] = NUL;
 	    if (!multiscan)
 		errmsg[0] = NUL;
 	    lnum = 0;
@@ -522,6 +528,17 @@
 		    col = (int)atol((char *)regmatch.startp[i]);
 		    use_viscol = TRUE;
 		}
+		if ((i = (int)fmt_ptr->addr[9]) > 0)		/* %s */
+		{
+		    len = (int)(regmatch.endp[i] - regmatch.startp[i]);
+		    if (len > CMDBUFFSIZE - 5)
+			len = CMDBUFFSIZE - 5;
+		    STRCPY(pattern, "^\\V");
+		    STRNCAT(pattern, regmatch.startp[i], len);
+		    pattern[len + 3] = '\\';
+		    pattern[len + 4] = '$';
+		    pattern[len + 5] = NUL;
+		}
 		break;
 	    }
 	}
@@ -624,6 +641,7 @@
 			lnum,
 			col,
 			use_viscol,
+			pattern,
 			enr,
 			type,
 			valid) == FAIL)
@@ -667,6 +685,7 @@
 qf_init_end:
     vim_free(namebuf);
     vim_free(errmsg);
+    vim_free(pattern);
     vim_free(fmtstr);
 
 #ifdef FEAT_WINDOWS
@@ -714,22 +733,23 @@
  * Returns OK or FAIL.
  */
     static int
-qf_add_entry(prevp, dir, fname, mesg, lnum, col, vis_col, nr, type, valid)
-    struct qf_line **prevp;	/* pointer to previously added entry or NULL */
+qf_add_entry(prevp, dir, fname, mesg, lnum, col, vis_col, pattern, nr, type,
+	     valid)
+    qfline_T	**prevp;	/* pointer to previously added entry or NULL */
     char_u	*dir;		/* optional directory name */
     char_u	*fname;		/* file name or NULL */
     char_u	*mesg;		/* message */
     long	lnum;		/* line number */
     int		col;		/* column */
     int		vis_col;	/* using visual column */
+    char_u	*pattern;	/* search pattern */
     int		nr;		/* error number */
     int		type;		/* type character */
     int		valid;		/* valid entry */
 {
-    struct qf_line *qfp;
+    qfline_T	*qfp;
 
-    if ((qfp = (struct qf_line *)alloc((unsigned)sizeof(struct qf_line)))
-								      == NULL)
+    if ((qfp = (qfline_T *)alloc((unsigned)sizeof(qfline_T))) == NULL)
 	return FAIL;
     qfp->qf_fnum = qf_get_fnum(dir, fname);
     if ((qfp->qf_text = vim_strsave(mesg)) == NULL)
@@ -740,6 +760,14 @@
     qfp->qf_lnum = lnum;
     qfp->qf_col = col;
     qfp->qf_viscol = vis_col;
+    if (pattern == NULL || *pattern == NUL)
+	qfp->qf_pattern = NULL;
+    else if ((qfp->qf_pattern = vim_strsave(pattern)) == NULL)
+    {
+	vim_free(qfp->qf_text);
+	vim_free(qfp);
+	return FAIL;
+    }
     qfp->qf_nr = nr;
     if (type != 1 && !vim_isprintc(type)) /* only printable chars allowed */
 	type = 0;
@@ -1018,8 +1046,8 @@
     int		errornr;
     int		forceit;
 {
-    struct qf_line	*qf_ptr;
-    struct qf_line	*old_qf_ptr;
+    qfline_T		*qf_ptr;
+    qfline_T		*old_qf_ptr;
     int			qf_index;
     int			old_qf_fnum;
     int			old_qf_index;
@@ -1272,46 +1300,59 @@
 	if (curbuf == old_curbuf)
 	    setpcmark();
 
-	/*
-	 * Go to line with error, unless qf_lnum is 0.
-	 */
-	i = qf_ptr->qf_lnum;
-	if (i > 0)
+	if (qf_ptr->qf_pattern == NULL)
 	{
-	    if (i > curbuf->b_ml.ml_line_count)
-		i = curbuf->b_ml.ml_line_count;
-	    curwin->w_cursor.lnum = i;
-	}
-	if (qf_ptr->qf_col > 0)
-	{
-	    curwin->w_cursor.col = qf_ptr->qf_col - 1;
-	    if (qf_ptr->qf_viscol == TRUE)
+	    /*
+	     * Go to line with error, unless qf_lnum is 0.
+	     */
+	    i = qf_ptr->qf_lnum;
+	    if (i > 0)
 	    {
-		/*
-		 * Check each character from the beginning of the error
-		 * line up to the error column.  For each tab character
-		 * found, reduce the error column value by the length of
-		 * a tab character.
-		 */
-		line = ml_get_curline();
-		screen_col = 0;
-		for (char_col = 0; char_col < curwin->w_cursor.col; ++char_col)
-		{
-		    if (*line == NUL)
-			break;
-		    if (*line++ == '\t')
-		    {
-			curwin->w_cursor.col -= 7 - (screen_col % 8);
-			screen_col += 8 - (screen_col % 8);
-		    }
-		    else
-			++screen_col;
-		}
+		if (i > curbuf->b_ml.ml_line_count)
+		    i = curbuf->b_ml.ml_line_count;
+		curwin->w_cursor.lnum = i;
 	    }
-	    check_cursor();
+	    if (qf_ptr->qf_col > 0)
+	    {
+		curwin->w_cursor.col = qf_ptr->qf_col - 1;
+		if (qf_ptr->qf_viscol == TRUE)
+		{
+		    /*
+		     * Check each character from the beginning of the error
+		     * line up to the error column.  For each tab character
+		     * found, reduce the error column value by the length of
+		     * a tab character.
+		     */
+		    line = ml_get_curline();
+		    screen_col = 0;
+		    for (char_col = 0; char_col < curwin->w_cursor.col; ++char_col)
+		    {
+			if (*line == NUL)
+			    break;
+			if (*line++ == '\t')
+			{
+			    curwin->w_cursor.col -= 7 - (screen_col % 8);
+			    screen_col += 8 - (screen_col % 8);
+			}
+			else
+			    ++screen_col;
+		    }
+		}
+		check_cursor();
+	    }
+	    else
+		beginline(BL_WHITE | BL_FIX);
 	}
 	else
-	    beginline(BL_WHITE | BL_FIX);
+	{
+	    pos_T save_cursor;
+
+	    /* Move the cursor to the first line in the buffer */
+	    save_cursor = curwin->w_cursor;
+	    curwin->w_cursor.lnum = 0;
+	    if (!do_search(NULL, '/', qf_ptr->qf_pattern, (long)1, SEARCH_KEEP))
+		curwin->w_cursor = save_cursor;
+	}
 
 #ifdef FEAT_FOLDING
 	if ((fdo_flags & FDO_QUICKFIX) && old_KeyTyped)
@@ -1383,16 +1424,16 @@
 qf_list(eap)
     exarg_T	*eap;
 {
-    buf_T		*buf;
-    char_u		*fname;
-    struct qf_line	*qfp;
-    int			i;
-    int			idx1 = 1;
-    int			idx2 = -1;
-    int			need_return = TRUE;
-    int			last_printed = 1;
-    char_u		*arg = eap->arg;
-    int			all = eap->forceit;	/* if not :cl!, only show
+    buf_T	*buf;
+    char_u	*fname;
+    qfline_T	*qfp;
+    int		i;
+    int		idx1 = 1;
+    int		idx2 = -1;
+    int		need_return = TRUE;
+    int		last_printed = 1;
+    char_u	*arg = eap->arg;
+    int		all = eap->forceit;	/* if not :cl!, only show
 						   recognised errors */
 
     if (qf_curlist >= qf_listcount || qf_lists[qf_curlist].qf_count == 0)
@@ -1447,9 +1488,17 @@
 		else
 		    sprintf((char *)IObuff, ":%ld col %d",
 						   qfp->qf_lnum, qfp->qf_col);
-		sprintf((char *)IObuff + STRLEN(IObuff), "%s: ",
+		sprintf((char *)IObuff + STRLEN(IObuff), "%s:",
 				  (char *)qf_types(qfp->qf_type, qfp->qf_nr));
 		msg_puts_attr(IObuff, hl_attr(HLF_N));
+		if (qfp->qf_pattern != NULL)
+		{
+		    qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE);
+		    STRCAT(IObuff, ":");
+		    msg_puts(IObuff);
+		}
+		msg_puts((char_u *)" ");
+
 		/* Remove newlines and leading whitespace from the text.
 		 * For an unrecognized line keep the indent, the compiler may
 		 * mark a word with ^^^^. */
@@ -1571,12 +1620,13 @@
 qf_free(idx)
     int		idx;
 {
-    struct qf_line *qfp;
+    qfline_T	*qfp;
 
     while (qf_lists[idx].qf_count)
     {
 	qfp = qf_lists[idx].qf_start->qf_next;
 	vim_free(qf_lists[idx].qf_start->qf_text);
+	vim_free(qf_lists[idx].qf_start->qf_pattern);
 	vim_free(qf_lists[idx].qf_start);
 	qf_lists[idx].qf_start = qfp;
 	--qf_lists[idx].qf_count;
@@ -1593,9 +1643,9 @@
     long	amount;
     long	amount_after;
 {
-    int			i;
-    struct qf_line	*qfp;
-    int			idx;
+    int		i;
+    qfline_T	*qfp;
+    int		idx;
 
     for (idx = 0; idx < qf_listcount; ++idx)
 	if (qf_lists[idx].qf_count)
@@ -1912,11 +1962,11 @@
     static void
 qf_fill_buffer()
 {
-    linenr_T		lnum;
-    struct qf_line	*qfp;
-    buf_T		*errbuf;
-    int			len;
-    int			old_KeyTyped = KeyTyped;
+    linenr_T	lnum;
+    qfline_T	*qfp;
+    buf_T	*errbuf;
+    int		len;
+    int		old_KeyTyped = KeyTyped;
 
     /* delete all existing lines */
     while ((curbuf->b_ml.ml_flags & ML_EMPTY) == 0)
@@ -1958,6 +2008,11 @@
 				  (char *)qf_types(qfp->qf_type, qfp->qf_nr));
 		len += (int)STRLEN(IObuff + len);
 	    }
+	    else if (qfp->qf_pattern != NULL)
+	    {
+		qf_fmt_text(qfp->qf_pattern, IObuff + len, IOSIZE - len);
+		len += (int)STRLEN(IObuff + len);
+	    }
 	    IObuff[len++] = '|';
 	    IObuff[len++] = ' ';
 
@@ -2285,7 +2340,7 @@
     char_u	*p;
     int		i;
     int		fi;
-    struct qf_line *prevp = NULL;
+    qfline_T	*prevp = NULL;
     long	lnum;
     garray_T	ga;
     buf_T	*buf;
@@ -2434,6 +2489,7 @@
 				regmatch.startpos[0].lnum + lnum,
 				regmatch.startpos[0].col + 1,
 				FALSE,      /* vis_col */
+				NULL,	    /* search pattern */
 				0,          /* nr */
 				0,          /* type */
 				TRUE        /* valid */
@@ -2696,10 +2752,10 @@
 get_errorlist(list)
     list_T	*list;
 {
-    dict_T	    *dict;
-    char_u	    buf[2];
-    struct qf_line  *qfp;
-    int		    i;
+    dict_T	*dict;
+    char_u	buf[2];
+    qfline_T	*qfp;
+    int		i;
 
     if (qf_curlist >= qf_listcount || qf_lists[qf_curlist].qf_count == 0)
     {
@@ -2722,6 +2778,7 @@
 	  || dict_add_nr_str(dict, "col",   (long)qfp->qf_col, NULL) == FAIL
 	  || dict_add_nr_str(dict, "vcol",  (long)qfp->qf_viscol, NULL) == FAIL
 	  || dict_add_nr_str(dict, "nr",    (long)qfp->qf_nr, NULL) == FAIL
+	  || dict_add_nr_str(dict, "pattern",  0L, qfp->qf_pattern) == FAIL
 	  || dict_add_nr_str(dict, "text",  0L, qfp->qf_text) == FAIL
 	  || dict_add_nr_str(dict, "type",  0L, buf) == FAIL
 	  || dict_add_nr_str(dict, "valid", (long)qfp->qf_valid, NULL) == FAIL)
@@ -2731,6 +2788,86 @@
     }
     return OK;
 }
+
+/*
+ * Populate the quickfix list with the items supplied in the list
+ * of dictionaries.
+ */
+    int
+set_errorlist(list)
+    list_T	*list;
+{
+    listitem_T	*li;
+    dict_T	*d;
+    char_u	*filename, *pattern, *text, *type;
+    long	lnum;
+    int		col, nr;
+    int		vcol;
+    qfline_T	*prevp = NULL;
+    int		valid, status;
+    int		retval = OK;
+
+    /* make place for a new list */
+    qf_new_list();
+
+    for (li = list->lv_first; li != NULL; li = li->li_next)
+    {
+	if (li->li_tv.v_type != VAR_DICT)
+	    continue; /* Skip non-dict items */
+
+	d = li->li_tv.vval.v_dict;
+	if (d == NULL)
+	    continue;
+
+	filename = get_dict_string(d, (char_u *)"filename");
+	lnum = get_dict_number(d, (char_u *)"lnum");
+	col = get_dict_number(d, (char_u *)"col");
+	vcol = get_dict_number(d, (char_u *)"vcol");
+	nr = get_dict_number(d, (char_u *)"nr");
+	type = get_dict_string(d, (char_u *)"type");
+	pattern = get_dict_string(d, (char_u *)"pattern");
+	text = get_dict_string(d, (char_u *)"text");
+	if (text == NULL)
+	    text = vim_strsave((char_u *)"");
+
+	valid = TRUE;
+	if (filename == NULL || (lnum == 0 && pattern == NULL))
+	    valid = FALSE;
+
+	status =  qf_add_entry(&prevp,
+			       NULL,	    /* dir */
+			       filename,
+			       text,
+			       lnum,
+			       col,
+			       vcol,	    /* vis_col */
+			       pattern,	    /* search pattern */
+			       nr,
+			       type == NULL ? NUL : *type,
+			       valid);
+
+	vim_free(filename);
+	vim_free(pattern);
+	vim_free(text);
+	vim_free(type);
+
+	if (status == FAIL)
+	{
+	    retval = FAIL;
+	    break;
+	}
+    }
+
+    qf_lists[qf_curlist].qf_nonevalid = FALSE;
+    qf_lists[qf_curlist].qf_ptr = qf_lists[qf_curlist].qf_start;
+    qf_lists[qf_curlist].qf_index = 1;
+
+#ifdef FEAT_WINDOWS
+    qf_update_buffer();
+#endif
+
+    return retval;
+}
 #endif
 
 /*
@@ -2779,7 +2916,7 @@
     char_u	**fnames;
     FILE	*fd;
     int		fi;
-    struct qf_line *prevp = NULL;
+    qfline_T	*prevp = NULL;
     long	lnum;
 #ifdef FEAT_MULTI_LANG
     char_u	*lang;
@@ -2848,6 +2985,7 @@
 					    (int)(regmatch.startp[0] - IObuff)
 								+ 1, /* col */
 					    FALSE,	/* vis_col */
+					    NULL,	/* search pattern */
 					    0,		/* nr */
 					    1,		/* type */
 					    TRUE	/* valid */
diff --git a/src/screen.c b/src/screen.c
index 28565fa..70c7ff1 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2337,7 +2337,7 @@
 		    else
 			len = W_WIDTH(wp) - txtcol;
 		    RL_MEMSET(wp->w_old_cursor_fcol + txtcol, hl_attr(HLF_V),
-						 len - wp->w_old_cursor_fcol);
+					    len - (int)wp->w_old_cursor_fcol);
 		}
 	    }
 	    else
@@ -3591,6 +3591,9 @@
 		 * @Spell cluster. */
 		if (has_spell && v >= word_end)
 		{
+		    spell_attr = 0;
+		    if (area_attr == 0 && search_attr == 0)
+			char_attr = syntax_attr;
 		    if (!has_syntax || can_spell)
 		    {
 			char_u	*prev_ptr = ptr - (
@@ -3599,7 +3602,6 @@
 # endif
 									    1);
 
-			spell_attr = 0;
 			iswordc = spell_iswordc(prev_ptr);
 			if (iswordc && !prev_iswordc)
 			{
@@ -3620,8 +3622,6 @@
 			}
 			prev_iswordc = iswordc;
 		    }
-		    else
-			spell_attr = 0;
 		}
 		if (spell_attr != 0)
 		    char_attr = hl_combine_attr(char_attr, spell_attr);
diff --git a/src/term.c b/src/term.c
index c4f2d9f..20203b5 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1030,13 +1030,15 @@
     {K_HOME,		IF_EB("\033[1;*H", ESC_STR "[1;*H")},
     /* {K_S_HOME,		IF_EB("\033O2H", ESC_STR "O2H")}, */
     /* {K_C_HOME,		IF_EB("\033O5H", ESC_STR "O5H")}, */
-    {K_KHOME,		IF_EB("\033[7;*~", ESC_STR "[7;*~")},
+    {K_KHOME,		IF_EB("\033[1;*~", ESC_STR "[1;*~")},
     {K_XHOME,		IF_EB("\033O*H", ESC_STR "O*H")},	/* other Home */
+    {K_ZHOME,		IF_EB("\033[7;*~", ESC_STR "[7;*~")},	/* other Home */
     {K_END,		IF_EB("\033[1;*F", ESC_STR "[1;*F")},
     /* {K_S_END,		IF_EB("\033O2F", ESC_STR "O2F")}, */
     /* {K_C_END,		IF_EB("\033O5F", ESC_STR "O5F")}, */
     {K_KEND,		IF_EB("\033[4;*~", ESC_STR "[4;*~")},
     {K_XEND,		IF_EB("\033O*F", ESC_STR "O*F")},	/* other End */
+    {K_ZEND,		IF_EB("\033[8;*~", ESC_STR "[8;*~")},
     {K_PAGEUP,		IF_EB("\033[5;*~", ESC_STR "[5;*~")},
     {K_PAGEDOWN,	IF_EB("\033[6;*~", ESC_STR "[6;*~")},
     {K_KPLUS,		IF_EB("\033O*k", ESC_STR "O*k")},	/* keypad plus */
@@ -1340,11 +1342,13 @@
     {K_C_HOME,		"[C-HOME]"},
     {K_KHOME,		"[KHOME]"},
     {K_XHOME,		"[XHOME]"},
+    {K_ZHOME,		"[ZHOME]"},
     {K_END,		"[END]"},
     {K_S_END,		"[C-END]"},
     {K_C_END,		"[C-END]"},
     {K_KEND,		"[KEND]"},
     {K_XEND,		"[XEND]"},
+    {K_ZEND,		"[ZEND]"},
     {K_PAGEUP,		"[PAGEUP]"},
     {K_PAGEDOWN,	"[PAGEDOWN]"},
     {K_KPAGEUP,		"[KPAGEUP]"},
diff --git a/src/version.h b/src/version.h
index 2f2da8b..8ecdf38 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
 #define VIM_VERSION_NODOT	"vim70aa"
 #define VIM_VERSION_SHORT	"7.0aa"
 #define VIM_VERSION_MEDIUM	"7.0aa ALPHA"
-#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 22)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 22, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 25)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 25, compiled "
