changeset 205:d292c40ca788

updated for version 7.0060
author vimboss
date Tue, 15 Mar 2005 22:43:58 +0000
parents a7547c77e563
children 87857ffdbf46
files runtime/doc/eval.txt runtime/doc/options.txt runtime/doc/tags runtime/doc/usr_10.txt runtime/menu.vim runtime/tutor/tutor.vim src/ex_cmds2.c src/gui_kde_x11.cc src/gui_photon.c src/gui_w32.c src/ops.c src/screen.c src/structs.h src/syntax.c src/term.c src/version.h
diffstat 16 files changed, 261 insertions(+), 130 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Mar 07
+*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Mar 15
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -9,7 +9,7 @@ Expression evaluation			*expression* *ex
 Using expressions is introduced in chapter 41 of the user manual |usr_41.txt|.
 
 Note: Expression evaluation can be disabled at compile time.  If this has been
-done, the features in this document are not available.  See |+eval| and 
+done, the features in this document are not available.  See |+eval| and
 |no-eval-feature|.
 
 1.  Variables			|variables|
@@ -445,7 +445,7 @@ expect ":echo adict" to show the items f
 adict.
 
 Weeding out entries from a Dictionary can be done with |filter()|: >
-	:call filter(dict 'v:val =~ "x"') 
+	:call filter(dict 'v:val =~ "x"')
 This removes all entries from "dict" with a value not matching 'x'.
 
 
@@ -1454,7 +1454,7 @@ diff_hlID( {lnum}, {col})	Number	diff hi
 empty( {expr})			Number	TRUE if {expr} is empty
 errorlist()			List	list of quickfix items
 escape( {string}, {chars})	String	escape {chars} in {string} with '\'
-eval( {string})			any	evaluate {string} into its value 
+eval( {string})			any	evaluate {string} into its value
 eventhandler( )			Number	TRUE if inside an event handler
 executable( {expr})		Number	1 if executable {expr} exists
 exists( {expr})			Number	TRUE if {expr} exists
@@ -1597,6 +1597,7 @@ synIDattr( {synID}, {what} [, {mode}])
 				String	attribute {what} of syntax ID {synID}
 synIDtrans( {synID})		Number	translated syntax ID of {synID}
 system( {expr} [, {input}])	String	output of shell command/filter {expr}
+taglist({expr})			List	list of tags matching {expr}
 tempname()			String	name for a temporary file
 tolower( {expr})		String	the String {expr} switched to lowercase
 toupper( {expr})		String	the String {expr} switched to uppercase
@@ -2494,7 +2495,7 @@ getfperm({fname})					*getfperm()*
 			:echo getfperm("/etc/passwd")
 <		This will hopefully (from a security point of view) display
 		the string "rw-r--r--" or even "rw-------".
-  
+
 getftime({fname})					*getftime()*
 		The result is a Number, which is the last modification time of
 		the given file {fname}.  The value is measured as seconds
@@ -3706,7 +3707,7 @@ stridx({haystack}, {needle} [, {start}])
 			:let comma1 = stridx(line, ",")
 			:let comma2 = stridx(line, ",", comma1 + 1)
 <		The search is done case-sensitive.
-		For pattern searches use |match()|. 
+		For pattern searches use |match()|.
 		-1 is returned if the {needle} does not occur in {haystack}.
 		See also |strridx()|.
 		Examples: >
@@ -3852,6 +3853,7 @@ synIDattr({synID}, {what} [, {mode}])			
 		"reverse"	"1" if reverse
 		"inverse"	"1" if inverse (= reverse)
 		"underline"	"1" if underlined
+		"undercurl"	"1" if undercurled
 
 		Example (echoes the color of the syntax item under the
 		cursor): >
@@ -3891,6 +3893,39 @@ system({expr} [, {input}])				*system()*
 		Unlike ":!cmd" there is no automatic check for changed files.
 		Use |:checktime| to force a check.
 
+
+taglist({expr})							*taglist()*
+		Returns a list of tags matching the regular expression {expr}.
+		Each list item is a dictionary with the following entries:
+			name		name of the tag.
+			filename	name of the file where the tag is
+					defined.
+			cmd		Ex command used to locate the tag in
+					the file.
+			kind		type of the tag. The value for this
+					entry depends on the language specific
+					kind values generated by the ctags
+					tool.
+			static		a file specific tag.  Refer to
+					|static-tag| for more information.
+		More entries may be present, depending on the content of the
+		tags file: access, implementation, inherits and signature.
+		Refer to the ctags documentation for information about these
+		fields.  For C code the fields "struct", "class" and "enum"
+		may appear, they give the name of the entity the tag is
+		contained in.
+
+		If there are no matching tags, then an empty list is returned.
+
+		To get an exact tag match, the anchors '^' and '$' should be
+		used in {expr}.  Refer to |tag-regexp| for more information
+		about the tag search regular expression pattern.
+
+		Refer to |'tags'| for information about how the tags file is
+		located by Vim. Refer to |tags-file-format| for the format of
+		the tags file generated by the different ctags tools.
+
+
 tempname()					*tempname()* *temp-file-name*
 		The result is a String, which is the name of a file that
 		doesn't exist.  It can be used for a temporary file.  The name
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*	For Vim version 7.0aa.  Last change: 2005 Mar 10
+*options.txt*	For Vim version 7.0aa.  Last change: 2005 Mar 14
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -3356,6 +3356,7 @@ A jump table for the options with a shor
 		b	bold		(termcap entry "md" and "me")
 		s	standout	(termcap entry "so" and "se")
 		u	underline	(termcap entry "us" and "ue")
+		c	undercurl	(termcap entry "Cs" and "Ce")
 		n	no highlighting
 		-	no highlighting
 		:	use a highlight group
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -767,7 +767,9 @@
 't_AL'	term.txt	/*'t_AL'*
 't_CS'	term.txt	/*'t_CS'*
 't_CV'	term.txt	/*'t_CV'*
+'t_Ce'	term.txt	/*'t_Ce'*
 't_Co'	term.txt	/*'t_Co'*
+'t_Cs'	term.txt	/*'t_Cs'*
 't_DL'	term.txt	/*'t_DL'*
 't_EI'	term.txt	/*'t_EI'*
 't_F1'	term.txt	/*'t_F1'*
@@ -5093,6 +5095,7 @@ hebrew	hebrew.txt	/*hebrew*
 hebrew.txt	hebrew.txt	/*hebrew.txt*
 help	various.txt	/*help*
 help-context	help.txt	/*help-context*
+help-tags	tags	1
 help-translated	various.txt	/*help-translated*
 help-xterm-window	various.txt	/*help-xterm-window*
 help.txt	help.txt	/*help.txt*
@@ -5112,6 +5115,7 @@ highlight-groups	syntax.txt	/*highlight-
 highlight-gui	syntax.txt	/*highlight-gui*
 highlight-guibg	syntax.txt	/*highlight-guibg*
 highlight-guifg	syntax.txt	/*highlight-guifg*
+highlight-guisp	syntax.txt	/*highlight-guisp*
 highlight-start	syntax.txt	/*highlight-start*
 highlight-stop	syntax.txt	/*highlight-stop*
 highlight-term	syntax.txt	/*highlight-term*
@@ -6297,7 +6301,9 @@ t_AF	term.txt	/*t_AF*
 t_AL	term.txt	/*t_AL*
 t_CS	term.txt	/*t_CS*
 t_CV	term.txt	/*t_CV*
+t_Ce	term.txt	/*t_Ce*
 t_Co	term.txt	/*t_Co*
+t_Cs	term.txt	/*t_Cs*
 t_DL	term.txt	/*t_DL*
 t_EI	term.txt	/*t_EI*
 t_F1	term.txt	/*t_F1*
--- a/runtime/doc/usr_10.txt
+++ b/runtime/doc/usr_10.txt
@@ -1,4 +1,4 @@
-*usr_10.txt*	For Vim version 7.0aa.  Last change: 2004 Mar 12
+*usr_10.txt*	For Vim version 7.0aa.  Last change: 2005 Mar 15
 
 		     VIM USER MANUAL - by Bram Moolenaar
 
@@ -437,7 +437,8 @@ If the string you insert contains a newl
 insert command and affects only the first line of the block.
 
 The "A" command works the same way, except that it appends after the right
-side of the block.
+side of the block.  And it does insert text in a short line.  Thus you can
+make a choice whether you do or don't want to append text to a short line.
    There is one special case for "A": Select a Visual block and then use "$"
 to make the block extend to the end of each line.  Using "A" now will append
 the text to the end of each line.
--- a/runtime/menu.vim
+++ b/runtime/menu.vim
@@ -2,7 +2,7 @@
 " You can also use this as a start for your own set of menus.
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2005 Feb 24
+" Last Change:	2005 Mar 15
 
 " Note that ":an" (short for ":anoremenu") is often used to make a menu work
 " in all modes and avoid side effects from mappings defined by the user.
@@ -56,9 +56,9 @@ if exists("v:lang") || &langmenu != ""
       let s:lang = substitute(s:lang, '\.[^.]*', "", "")
       exe "runtime! lang/menu_" . s:lang . "[^a-z]*vim"
 
-      if !exists("did_menu_trans") && strlen($LANG) > 1
+      if !exists("did_menu_trans") && strlen($LANG) > 1 && s:lang !~ '^en_us'
 	" On windows locale names are complicated, try using $LANG, it might
-	" have been set by set_init_1().
+	" have been set by set_init_1().  But don't do this for "en" or "en_us".
 	" But don't match "slovak" when $LANG is "sl".
 	exe "runtime! lang/menu_" . tolower($LANG) . "[^a-z]*vim"
       endif
@@ -854,28 +854,13 @@ if has("toolbar")
 
   if !has("gui_athena")
     an 1.95   ToolBar.-sep3-		<Nop>
-    an 1.100  ToolBar.Find		:promptfind<CR>
-    vunmenu   ToolBar.Find
-    vnoremenu ToolBar.Find		y:promptfind <C-R>"<CR>
-    an 1.110  ToolBar.FindNext		n
-    an 1.120  ToolBar.FindPrev		N
-    an 1.130  ToolBar.Replace		:promptrepl<CR>
+    an 1.100  ToolBar.Replace		:promptrepl<CR>
     vunmenu   ToolBar.Replace
     vnoremenu ToolBar.Replace		y:promptrepl <C-R>"<CR>
+    an 1.110  ToolBar.FindNext		n
+    an 1.120  ToolBar.FindPrev		N
   endif
 
-if 0	" disabled; These are in the Windows menu
-  an 1.135 ToolBar.-sep4-		<Nop>
-  an 1.140 ToolBar.New			<C-W>n
-  an 1.150 ToolBar.WinSplit		<C-W>s
-  an 1.160 ToolBar.WinMax		:resize 200<CR>
-  an 1.170 ToolBar.WinMin		:resize 1<CR>
-  an 1.180 ToolBar.WinVSplit		<C-W>v
-  an 1.190 ToolBar.WinMaxWidth		<C-W>500>
-  an 1.200 ToolBar.WinMinWidth		<C-W>1\|
-  an 1.210 ToolBar.WinClose		:close<CR>
-endif
-
   an 1.215 ToolBar.-sep5-		<Nop>
   an <silent> 1.220 ToolBar.LoadSesn	:call <SID>LoadVimSesn()<CR>
   an <silent> 1.230 ToolBar.SaveSesn	:call <SID>SaveVimSesn()<CR>
@@ -910,21 +895,11 @@ else
     tmenu ToolBar.FindPrev	Find Previous
     tmenu ToolBar.Replace		Find / Replace...
   endif
- if 0	" disabled; These are in the Windows menu
-  tmenu ToolBar.New		New Window
-  tmenu ToolBar.WinSplit	Split Window
-  tmenu ToolBar.WinMax		Maximise Window
-  tmenu ToolBar.WinMin		Minimise Window
-  tmenu ToolBar.WinVSplit	Split Window Vertically
-  tmenu ToolBar.WinMaxWidth	Maximise Window Width
-  tmenu ToolBar.WinMinWidth	Minimise Window Width
-  tmenu ToolBar.WinClose	Close Window
- endif
-  tmenu ToolBar.LoadSesn	Load session
+  tmenu ToolBar.LoadSesn	Chose a session to load
   tmenu ToolBar.SaveSesn	Save current session
-  tmenu ToolBar.RunScript	Run a Vim Script
-  tmenu ToolBar.Make		Make current project
-  tmenu ToolBar.RunCtags	Build tags in current directory tree
+  tmenu ToolBar.RunScript	Chose a Vim Script to run
+  tmenu ToolBar.Make		Make current project (:make)
+  tmenu ToolBar.RunCtags	Build tags in current directory tree (!ctags -R .)
   tmenu ToolBar.TagJump		Jump to tag under cursor
   tmenu ToolBar.Help		Vim Help
   tmenu ToolBar.FindHelp	Search Vim Help
--- a/runtime/tutor/tutor.vim
+++ b/runtime/tutor/tutor.vim
@@ -1,6 +1,6 @@
 " Vim tutor support file
 " Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
-" Last Change:	2004 Sep 06
+" Last Change:	2005 Mar 15
 
 " This small source file is used for detecting if a translation of the
 " tutor file exist, i.e., a tutor.xx file, where xx is the language.
@@ -15,11 +15,16 @@ if strlen($xx) > 1
   let s:ext = "." . $xx
 else
   let s:lang = ""
-  if exists("v:lang") && v:lang != "C"
+  if exists("v:lang")
     let s:lang = v:lang
-  elseif strlen($LANG) > 0 && $LANG != "C"
+  elseif strlen($LC_ALL) > 0
+    let s:lang = $LC_ALL
+  elseif strlen($LANG) > 0
     let s:lang = $LANG
   endif
+  if s:lang == "C"
+    let s:lang = ""
+  endif
   if s:lang != ""
     " Remove "@euro" (ignoring case), it may be at the end
     let s:lang = substitute(s:lang, '\c@euro', '', '')
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -3125,11 +3125,11 @@ getsourceline(c, cookie, indent)
 	line = sp->nextline;
 	sp->nextline = NULL;
 	++sourcing_lnum;
+    }
 #ifdef FEAT_PROFILE
-	if (do_profiling)
-	    script_line_start();
-#endif
-    }
+    if (line != NULL && do_profiling)
+	script_line_start();
+#endif
 
     /* Only concatenate lines starting with a \ when 'cpoptions' doesn't
      * contain the 'C' flag. */
@@ -3684,7 +3684,7 @@ prt_get_term_color(colorindex)
     static void
 prt_get_attr(hl_id, pattr, modec)
     int			hl_id;
-    prt_text_attr_T*	pattr;
+    prt_text_attr_T	*pattr;
     int			modec;
 {
     int     colorindex;
@@ -3695,6 +3695,7 @@ prt_get_attr(hl_id, pattr, modec)
     pattr->bold = (highlight_has_attr(hl_id, HL_BOLD, modec) != NULL);
     pattr->italic = (highlight_has_attr(hl_id, HL_ITALIC, modec) != NULL);
     pattr->underline = (highlight_has_attr(hl_id, HL_UNDERLINE, modec) != NULL);
+    pattr->undercurl = (highlight_has_attr(hl_id, HL_UNDERCURL, modec) != NULL);
 
 # ifdef FEAT_GUI
     if (gui.in_use)
--- a/src/gui_kde_x11.cc
+++ b/src/gui_kde_x11.cc
@@ -840,6 +840,15 @@ gui_mch_set_bg_color(guicolor_T color)//
 }//}}}
 
 /*
+ * Set the current text special color.
+ */
+    void
+gui_mch_set_sp_color(guicolor_T color)//{{{
+{
+    /* TODO */
+}//}}}
+
+/*
  * Use the blank mouse pointer or not.
  *
  * hide: TRUE = use blank ptr, FALSE = use parent ptr
--- a/src/gui_photon.c
+++ b/src/gui_photon.c
@@ -2114,6 +2114,11 @@ gui_mch_set_bg_color(guicolor_T color)
 }
 
     void
+gui_mch_set_sp_color(guicolor_T color)
+{
+}
+
+    void
 gui_mch_invert_rectangle(int row, int col, int nr, int nc)
 {
     PhRect_t rect;
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1400,6 +1400,15 @@ gui_mch_set_bg_color(guicolor_T color)
     gui.currBgColor = color;
 }
 
+/*
+ * Set the current text special color.
+ */
+    void
+gui_mch_set_sp_color(guicolor_T color)
+{
+    gui.currSpColor = color;
+}
+
 #if defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)
 /*
  * Multi-byte handling, originally by Sung-Hoon Baek.
@@ -2013,6 +2022,7 @@ gui_mch_draw_string(
 			 foptions, pcliprect, (char *)text, len, padding);
     }
 
+    /* Underline */
     if (flags & DRAW_UNDERL)
     {
 	hpen = CreatePen(PS_SOLID, 1, gui.currFgColor);
@@ -2029,6 +2039,21 @@ gui_mch_draw_string(
 	LineTo(s_hdc, FILL_X(col + len), y);
 	DeleteObject(SelectObject(s_hdc, old_pen));
     }
+
+    /* Undercurl */
+    if (flags & DRAW_UNDERC)
+    {
+	int			x;
+	int			offset;
+	const static int	val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
+
+	y = FILL_Y(row + 1) - 1;
+	for (x = FILL_X(col); x < FILL_X(col + len); ++x)
+	{
+	    offset = val[x % 8];
+	    SetPixel(s_hdc, x, y - offset, gui.currSpColor);
+	}
+    }
 }
 
 
@@ -4045,7 +4070,7 @@ BevalTimerProc(hwnd, uMsg, idEvent, dwTi
 	cur_beval->x = pt.x;
 	cur_beval->y = pt.y;
 
-	TRACE0("BevalTimerProc: sending request");
+	// TRACE0("BevalTimerProc: sending request");
 
 	if (cur_beval->msgCB != NULL)
 	    (*cur_beval->msgCB)(cur_beval, 0);
@@ -4056,22 +4081,22 @@ BevalTimerProc(hwnd, uMsg, idEvent, dwTi
 gui_mch_disable_beval_area(beval)
     BalloonEval	*beval;
 {
-    TRACE0("gui_mch_disable_beval_area {{{");
+    // TRACE0("gui_mch_disable_beval_area {{{");
     KillTimer(s_textArea, BevalTimerId);
-    TRACE0("gui_mch_disable_beval_area }}}");
+    // TRACE0("gui_mch_disable_beval_area }}}");
 }
 
     void
 gui_mch_enable_beval_area(beval)
     BalloonEval	*beval;
 {
-    TRACE0("gui_mch_enable_beval_area |||");
+    // TRACE0("gui_mch_enable_beval_area |||");
     if (beval == NULL)
 	return;
-    TRACE0("gui_mch_enable_beval_area {{{");
+    // TRACE0("gui_mch_enable_beval_area {{{");
     BevalTimerId = SetTimer(s_textArea, 0, p_bdlay / 2,
 						   (TIMERPROC)BevalTimerProc);
-    TRACE0("gui_mch_enable_beval_area }}}");
+    // TRACE0("gui_mch_enable_beval_area }}}");
 }
 
     void
@@ -4080,7 +4105,7 @@ gui_mch_post_balloon(beval, mesg)
     char_u	*mesg;
 {
     POINT   pt;
-    TRACE0("gui_mch_post_balloon {{{");
+    // TRACE0("gui_mch_post_balloon {{{");
     if (beval->showState == ShS_SHOWING)
 	return;
     GetCursorPos(&pt);
@@ -4093,7 +4118,7 @@ gui_mch_post_balloon(beval, mesg)
 	beval->showState = ShS_SHOWING;
 	make_tooltip(beval, mesg, pt);
     }
-    TRACE0("gui_mch_post_balloon }}}");
+    // TRACE0("gui_mch_post_balloon }}}");
 }
 
     BalloonEval *
@@ -4148,15 +4173,15 @@ Handle_WM_Notify(hwnd, pnmh)
     {
 	if (pnmh->code == TTN_SHOW)
 	{
-	    TRACE0("TTN_SHOW {{{");
-	    TRACE0("TTN_SHOW }}}");
+	    // TRACE0("TTN_SHOW {{{");
+	    // TRACE0("TTN_SHOW }}}");
 	}
 	else if (pnmh->code == TTN_POP) /* Before tooltip disappear */
 	{
-	    TRACE0("TTN_POP {{{");
+	    // TRACE0("TTN_POP {{{");
 	    delete_tooltip(cur_beval);
 	    gui_mch_enable_beval_area(cur_beval);
-	    TRACE0("TTN_POP }}}");
+	    // TRACE0("TTN_POP }}}");
 
 	    cur_beval->showState = ShS_NEUTRAL;
 	}
--- a/src/ops.c
+++ b/src/ops.c
@@ -2888,7 +2888,18 @@ op_yank(oap, deleting, mess)
 	    /* redisplay now, so message is not deleted */
 	    update_topline_redraw();
 	    if (yanklines == 1)
-		MSG(_("1 line yanked"));
+	    {
+#ifdef FEAT_VISUAL
+		if (oap->block_mode)
+		    MSG(_("block of 1 line yanked"));
+		else
+#endif
+		    MSG(_("1 line yanked"));
+	    }
+#ifdef FEAT_VISUAL
+	    else if (oap->block_mode)
+		smsg((char_u *)_("block of %ld lines yanked"), yanklines);
+#endif
 	    else
 		smsg((char_u *)_("%ld lines yanked"), yanklines);
 	}
--- a/src/screen.c
+++ b/src/screen.c
@@ -5870,7 +5870,8 @@ screen_start_highlight(attr)
 		out_str(T_MD);
 	    if ((attr & HL_STANDOUT) && T_SO != NULL)	/* standout */
 		out_str(T_SO);
-	    if ((attr & HL_UNDERLINE) && T_US != NULL)	/* underline */
+	    if ((attr & (HL_UNDERLINE | HL_UNDERCURL)) && T_US != NULL)
+						   /* underline or undercurl */
 		out_str(T_US);
 	    if ((attr & HL_ITALIC) && T_CZH != NULL)	/* italic */
 		out_str(T_CZH);
@@ -5965,7 +5966,7 @@ screen_stop_highlight()
 		else
 		    out_str(T_SE);
 	    }
-	    if (screen_attr & HL_UNDERLINE)
+	    if (screen_attr & (HL_UNDERLINE | HL_UNDERCURL))
 	    {
 		if (STRCMP(T_UE, T_ME) == 0)
 		    do_ME = TRUE;
@@ -6856,7 +6857,7 @@ windgoto(row, col)
     int	    row;
     int	    col;
 {
-    char_u	    *p;
+    sattr_T	    *p;
     int		    i;
     int		    plan;
     int		    cost;
--- a/src/structs.h
+++ b/src/structs.h
@@ -778,6 +778,7 @@ typedef struct attr_entry
 	{
 	    guicolor_T	    fg_color;	/* foreground color handle */
 	    guicolor_T	    bg_color;	/* background color handle */
+	    guicolor_T	    sp_color;	/* special color handle */
 	    GuiFont	    font;	/* font handle */
 #  ifdef FEAT_XFONTSET
 	    GuiFontset	    fontset;	/* fontset handle */
@@ -2055,6 +2056,7 @@ typedef struct
     int		bold;
     int		italic;
     int		underline;
+    int		undercurl;
 } prt_text_attr_T;
 
 /*
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -40,6 +40,8 @@ struct hl_group
     char_u	*sg_gui_fg_name;/* GUI foreground color name */
     guicolor_T	sg_gui_bg;	/* GUI background color handle */
     char_u	*sg_gui_bg_name;/* GUI background color name */
+    guicolor_T	sg_gui_sp;	/* GUI special color handle */
+    char_u	*sg_gui_sp_name;/* GUI special color name */
     GuiFont	sg_font;	/* GUI font handle */
 #ifdef FEAT_XFONTSET
     GuiFontset	sg_fontset;	/* GUI fontset handle */
@@ -70,9 +72,10 @@ static int include_link = FALSE;	/* incl
  * following names, separated by commas (but no spaces!).
  */
 static char *(hl_name_table[]) =
-    {"bold", "standout", "underline", "italic", "reverse", "inverse", "NONE"};
+    {"bold", "standout", "underline", "undercurl",
+				      "italic", "reverse", "inverse", "NONE"};
 static int hl_attr_table[] =
-    {HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_ITALIC, HL_INVERSE, HL_INVERSE, 0};
+    {HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_UNDERCURL, HL_ITALIC, HL_INVERSE, HL_INVERSE, 0};
 
 static int get_attr_entry  __ARGS((garray_T *table, attrentry_T *aep));
 static void syn_unadd_group __ARGS((void));
@@ -1848,7 +1851,7 @@ syn_current_attr(syncing, displaying)
 	      {
 		syn_id = check_keyword_id(line, (int)current_col,
 					 &endcol, &flags, &next_list, cur_si);
-		if (syn_id)
+		if (syn_id != 0)
 		{
 		    if (push_current_state(KEYWORD_IDX) == OK)
 		    {
@@ -1893,7 +1896,7 @@ syn_current_attr(syncing, displaying)
 	    }
 
 	    /*
-	     * 3. Check for patterns (only if not found a keyword).
+	     * 3. Check for patterns (only if no keyword found).
 	     */
 	    if (syn_id == 0 && syn_buf->b_syn_patterns.ga_len)
 	    {
@@ -6758,65 +6761,86 @@ do_highlight(line, forceit, init)
 	else if (STRCMP(key, "GUIFG") == 0)
 	{
 #ifdef FEAT_GUI	    /* in non-GUI guifg colors are simply ignored */
-	  if (!init || !(HL_TABLE()[idx].sg_set & SG_GUI))
-	  {
-	    if (!init)
-		HL_TABLE()[idx].sg_set |= SG_GUI;
-
-	    i = color_name2handle(arg);
-	    if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
+	    if (!init || !(HL_TABLE()[idx].sg_set & SG_GUI))
 	    {
-		HL_TABLE()[idx].sg_gui_fg = i;
-		vim_free(HL_TABLE()[idx].sg_gui_fg_name);
-		if (STRCMP(arg, "NONE"))
-		    HL_TABLE()[idx].sg_gui_fg_name = vim_strsave(arg);
-		else
-		    HL_TABLE()[idx].sg_gui_fg_name = NULL;
+		if (!init)
+		    HL_TABLE()[idx].sg_set |= SG_GUI;
+
+		i = color_name2handle(arg);
+		if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
+		{
+		    HL_TABLE()[idx].sg_gui_fg = i;
+		    vim_free(HL_TABLE()[idx].sg_gui_fg_name);
+		    if (STRCMP(arg, "NONE"))
+			HL_TABLE()[idx].sg_gui_fg_name = vim_strsave(arg);
+		    else
+			HL_TABLE()[idx].sg_gui_fg_name = NULL;
 # ifdef FEAT_GUI_X11
-		if (is_menu_group)
-		    gui.menu_fg_pixel = i;
-		if (is_scrollbar_group)
-		    gui.scroll_fg_pixel = i;
+		    if (is_menu_group)
+			gui.menu_fg_pixel = i;
+		    if (is_scrollbar_group)
+			gui.scroll_fg_pixel = i;
 #  ifdef FEAT_BEVAL
-		if (is_tooltip_group)
-		    gui.tooltip_fg_pixel = i;
+		    if (is_tooltip_group)
+			gui.tooltip_fg_pixel = i;
 #  endif
-		do_colors = TRUE;
+		    do_colors = TRUE;
 # endif
+		}
 	    }
-	  }
 #endif
 	}
 	else if (STRCMP(key, "GUIBG") == 0)
 	{
 #ifdef FEAT_GUI	    /* in non-GUI guibg colors are simply ignored */
-	  if (!init || !(HL_TABLE()[idx].sg_set & SG_GUI))
-	  {
-	    if (!init)
-		HL_TABLE()[idx].sg_set |= SG_GUI;
-
-	    i = color_name2handle(arg);
-	    if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
+	    if (!init || !(HL_TABLE()[idx].sg_set & SG_GUI))
 	    {
-		HL_TABLE()[idx].sg_gui_bg = i;
-		vim_free(HL_TABLE()[idx].sg_gui_bg_name);
-		if (STRCMP(arg, "NONE"))
-		    HL_TABLE()[idx].sg_gui_bg_name = vim_strsave(arg);
-		else
-		    HL_TABLE()[idx].sg_gui_bg_name = NULL;
+		if (!init)
+		    HL_TABLE()[idx].sg_set |= SG_GUI;
+
+		i = color_name2handle(arg);
+		if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
+		{
+		    HL_TABLE()[idx].sg_gui_bg = i;
+		    vim_free(HL_TABLE()[idx].sg_gui_bg_name);
+		    if (STRCMP(arg, "NONE") != 0)
+			HL_TABLE()[idx].sg_gui_bg_name = vim_strsave(arg);
+		    else
+			HL_TABLE()[idx].sg_gui_bg_name = NULL;
 # ifdef FEAT_GUI_X11
-		if (is_menu_group)
-		    gui.menu_bg_pixel = i;
-		if (is_scrollbar_group)
-		    gui.scroll_bg_pixel = i;
+		    if (is_menu_group)
+			gui.menu_bg_pixel = i;
+		    if (is_scrollbar_group)
+			gui.scroll_bg_pixel = i;
 #  ifdef FEAT_BEVAL
-		if (is_tooltip_group)
-		    gui.tooltip_bg_pixel = i;
+		    if (is_tooltip_group)
+			gui.tooltip_bg_pixel = i;
 #  endif
-		do_colors = TRUE;
+		    do_colors = TRUE;
 # endif
+		}
 	    }
-	  }
+#endif
+	}
+	else if (STRCMP(key, "GUISP") == 0)
+	{
+#ifdef FEAT_GUI	    /* in non-GUI guisp colors are simply ignored */
+	    if (!init || !(HL_TABLE()[idx].sg_set & SG_GUI))
+	    {
+		if (!init)
+		    HL_TABLE()[idx].sg_set |= SG_GUI;
+
+		i = color_name2handle(arg);
+		if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
+		{
+		    HL_TABLE()[idx].sg_gui_sp = i;
+		    vim_free(HL_TABLE()[idx].sg_gui_sp_name);
+		    if (STRCMP(arg, "NONE") != 0)
+			HL_TABLE()[idx].sg_gui_sp_name = vim_strsave(arg);
+		    else
+			HL_TABLE()[idx].sg_gui_sp_name = NULL;
+		}
+	    }
 #endif
 	}
 	else if (STRCMP(key, "START") == 0 || STRCMP(key, "STOP") == 0)
@@ -7035,6 +7059,9 @@ highlight_clear(idx)
     HL_TABLE()[idx].sg_gui_bg = INVALCOLOR;
     vim_free(HL_TABLE()[idx].sg_gui_bg_name);
     HL_TABLE()[idx].sg_gui_bg_name = NULL;
+    HL_TABLE()[idx].sg_gui_sp = INVALCOLOR;
+    vim_free(HL_TABLE()[idx].sg_gui_sp_name);
+    HL_TABLE()[idx].sg_gui_sp_name = NULL;
     gui_mch_free_font(HL_TABLE()[idx].sg_font);
     HL_TABLE()[idx].sg_font = NOFONT;
 # ifdef FEAT_XFONTSET
@@ -7057,16 +7084,16 @@ highlight_clear(idx)
 set_normal_colors()
 {
     if (set_group_colors((char_u *)"Normal",
-			       &gui.norm_pixel, &gui.back_pixel, FALSE, TRUE,
-			       FALSE))
+			     &gui.norm_pixel, &gui.back_pixel,
+			     FALSE, TRUE, FALSE))
     {
 	gui_mch_new_colors();
 	must_redraw = CLEAR;
     }
 #ifdef FEAT_GUI_X11
     if (set_group_colors((char_u *)"Menu",
-			 &gui.menu_fg_pixel, &gui.menu_bg_pixel, TRUE, FALSE,
-			 FALSE))
+			 &gui.menu_fg_pixel, &gui.menu_bg_pixel,
+			 TRUE, FALSE, FALSE))
     {
 # ifdef FEAT_MENU
 	gui_mch_new_menu_colors();
@@ -7085,8 +7112,8 @@ set_normal_colors()
     }
 #endif
     if (set_group_colors((char_u *)"Scrollbar",
-		    &gui.scroll_fg_pixel, &gui.scroll_bg_pixel, FALSE, FALSE,
-		    FALSE))
+		    &gui.scroll_fg_pixel, &gui.scroll_bg_pixel,
+		    FALSE, FALSE, FALSE))
     {
 	gui_new_scrollbar_colors();
 	must_redraw = CLEAR;
@@ -7397,6 +7424,7 @@ get_attr_entry(table, aep)
 		       (table == &gui_attr_table
 			&& (aep->ae_u.gui.fg_color == gap->ae_u.gui.fg_color
 			    && aep->ae_u.gui.bg_color == gap->ae_u.gui.bg_color
+			    && aep->ae_u.gui.sp_color == gap->ae_u.gui.sp_color
 			    && aep->ae_u.gui.font == gap->ae_u.gui.font
 #  ifdef FEAT_XFONTSET
 			    && aep->ae_u.gui.fontset == gap->ae_u.gui.fontset
@@ -7464,6 +7492,7 @@ get_attr_entry(table, aep)
     {
 	gap->ae_u.gui.fg_color = aep->ae_u.gui.fg_color;
 	gap->ae_u.gui.bg_color = aep->ae_u.gui.bg_color;
+	gap->ae_u.gui.sp_color = aep->ae_u.gui.sp_color;
 	gap->ae_u.gui.font = aep->ae_u.gui.font;
 # ifdef FEAT_XFONTSET
 	gap->ae_u.gui.fontset = aep->ae_u.gui.fontset;
@@ -7656,21 +7685,24 @@ highlight_has_attr(id, flag, modec)
     char_u *
 highlight_color(id, what, modec)
     int		id;
-    char_u	*what;	/* "fg", "bg", "fg#" or "bg#" */
+    char_u	*what;	/* "fg", "bg", "sp", "fg#", "bg#" or "sp#" */
     int		modec;	/* 'g' for GUI, 'c' for cterm, 't' for term */
 {
     static char_u	name[20];
     int			n;
-    int			fg;
+    int			fg = FALSE;
+# ifdef FEAT_GUI
+    int			sp = FALSE;
+# endif
 
     if (id <= 0 || id > highlight_ga.ga_len)
 	return NULL;
 
     if (TOLOWER_ASC(what[0]) == 'f')
 	fg = TRUE;
-    else
-	fg = FALSE;
-#ifdef FEAT_GUI
+# ifdef FEAT_GUI
+    else if (TOLOWER_ASC(what[0]) == 's')
+	sp = TRUE;
     if (modec == 'g')
     {
 	/* return #RRGGBB form (only possible when GUI is running) */
@@ -7682,6 +7714,8 @@ highlight_color(id, what, modec)
 
 	    if (fg)
 		color = HL_TABLE()[id - 1].sg_gui_fg;
+	    else if (sp)
+		color = HL_TABLE()[id - 1].sg_gui_sp;
 	    else
 		color = HL_TABLE()[id - 1].sg_gui_bg;
 	    if (color == INVALCOLOR)
@@ -7695,9 +7729,11 @@ highlight_color(id, what, modec)
 	}
 	if (fg)
 	    return (HL_TABLE()[id - 1].sg_gui_fg_name);
+	if (sp)
+	    return (HL_TABLE()[id - 1].sg_gui_sp_name);
 	return (HL_TABLE()[id - 1].sg_gui_bg_name);
     }
-#endif
+# endif
     if (modec == 'c')
     {
 	if (fg)
@@ -7805,6 +7841,7 @@ set_hl_attr(idx)
      */
     if (sgp->sg_gui_fg == INVALCOLOR
 	    && sgp->sg_gui_bg == INVALCOLOR
+	    && sgp->sg_gui_sp == INVALCOLOR
 	    && sgp->sg_font == NOFONT
 # ifdef FEAT_XFONTSET
 	    && sgp->sg_fontset == NOFONTSET
@@ -7818,6 +7855,7 @@ set_hl_attr(idx)
 	at_en.ae_attr = sgp->sg_gui;
 	at_en.ae_u.gui.fg_color = sgp->sg_gui_fg;
 	at_en.ae_u.gui.bg_color = sgp->sg_gui_bg;
+	at_en.ae_u.gui.sp_color = sgp->sg_gui_sp;
 	at_en.ae_u.gui.font = sgp->sg_font;
 # ifdef FEAT_XFONTSET
 	at_en.ae_u.gui.fontset = sgp->sg_fontset;
@@ -7989,6 +8027,7 @@ syn_add_group(name)
 #ifdef FEAT_GUI
     HL_TABLE()[highlight_ga.ga_len].sg_gui_bg = INVALCOLOR;
     HL_TABLE()[highlight_ga.ga_len].sg_gui_fg = INVALCOLOR;
+    HL_TABLE()[highlight_ga.ga_len].sg_gui_sp = INVALCOLOR;
 #endif
     ++highlight_ga.ga_len;
 
@@ -8131,6 +8170,12 @@ gui_do_one_color(idx, do_menu, do_toolti
 			    color_name2handle(HL_TABLE()[idx].sg_gui_bg_name);
 	didit = TRUE;
     }
+    if (HL_TABLE()[idx].sg_gui_sp_name != NULL)
+    {
+	HL_TABLE()[idx].sg_gui_sp =
+			    color_name2handle(HL_TABLE()[idx].sg_gui_sp_name);
+	didit = TRUE;
+    }
     if (didit)	/* need to get a new attr number */
 	set_hl_attr(idx);
 }
@@ -8222,6 +8267,8 @@ highlight_changed()
 				break;
 		    case 'u':	attr |= HL_UNDERLINE;
 				break;
+		    case 'c':	attr |= HL_UNDERCURL;
+				break;
 		    case ':':	++p;		    /* highlight group name */
 				if (attr || *p == NUL)	 /* no combinations */
 				    return FAIL;
@@ -8320,6 +8367,8 @@ highlight_changed()
 		hlt[hlcnt + i].sg_gui_fg = hlt[id - 1].sg_gui_fg;
 	    if (hlt[id - 1].sg_gui_bg != hlt[id_S - 1].sg_gui_bg)
 		hlt[hlcnt + i].sg_gui_bg = hlt[id - 1].sg_gui_bg;
+	    if (hlt[id - 1].sg_gui_sp != hlt[id_S - 1].sg_gui_sp)
+		hlt[hlcnt + i].sg_gui_sp = hlt[id - 1].sg_gui_sp;
 	    if (hlt[id - 1].sg_font != hlt[id_S - 1].sg_font)
 		hlt[hlcnt + i].sg_font = hlt[id - 1].sg_font;
 #   ifdef FEAT_XFONTSET
--- a/src/term.c
+++ b/src/term.c
@@ -182,6 +182,8 @@ struct builtin_term builtin_termcaps[] =
     {(int)KS_SO,	IF_EB("\033|16h", ESC_STR "|16h")}, /* HL_STANDOUT */
     {(int)KS_UE,	IF_EB("\033|8H", ESC_STR "|8H")},   /* HL_UNDERLINE */
     {(int)KS_US,	IF_EB("\033|8h", ESC_STR "|8h")},   /* HL_UNDERLINE */
+    {(int)KS_UCE,	IF_EB("\033|8C", ESC_STR "|8C")},   /* HL_UNDERCURL */
+    {(int)KS_UCS,	IF_EB("\033|8c", ESC_STR "|8c")},   /* HL_UNDERCURL */
     {(int)KS_CZR,	IF_EB("\033|4H", ESC_STR "|4H")},   /* HL_ITALIC */
     {(int)KS_CZH,	IF_EB("\033|4h", ESC_STR "|4h")},   /* HL_ITALIC */
     {(int)KS_VB,	IF_EB("\033|f", ESC_STR "|f")},
@@ -195,7 +197,7 @@ struct builtin_term builtin_termcaps[] =
     {(int)KS_CM,	IF_EB("\033|%d;%dM", ESC_STR "|%d;%dM")},
 # endif
 	/* there are no key sequences here, the GUI sequences are recognized
-	 * in check_termcodes() */
+	 * in check_termcode() */
 #endif
 
 #ifndef NO_BUILTIN_TCAPS
@@ -1248,6 +1250,8 @@ struct builtin_term builtin_termcaps[] =
     {(int)KS_SO,	"[SO]"},
     {(int)KS_UE,	"[UE]"},
     {(int)KS_US,	"[US]"},
+    {(int)KS_UCE,	"[UCE]"},
+    {(int)KS_UCS,	"[UCS]"},
     {(int)KS_MS,	"[MS]"},
     {(int)KS_UT,	"[UT]"},
 #  ifdef TERMINFO
@@ -1644,7 +1648,8 @@ set_termname(term)
 				{KS_VS, "vs"}, {KS_ME, "me"}, {KS_MR, "mr"},
 				{KS_MD, "md"}, {KS_SE, "se"}, {KS_SO, "so"},
 				{KS_CZH,"ZH"}, {KS_CZR,"ZR"}, {KS_UE, "ue"},
-				{KS_US, "us"}, {KS_CM, "cm"}, {KS_SR, "sr"},
+				{KS_US, "us"}, {KS_UCE, "Ce"}, {KS_UCS, "Cs"},
+				{KS_CM, "cm"}, {KS_SR, "sr"},
 				{KS_CRI,"RI"}, {KS_VB, "vb"}, {KS_KS, "ks"},
 				{KS_KE, "ke"}, {KS_TI, "ti"}, {KS_TE, "te"},
 				{KS_BC, "bc"}, {KS_CSB,"Sb"}, {KS_CSF,"Sf"},
--- 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 11)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 11, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 15)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 15, compiled "