diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index edb2fc3348beb8c55aeafabfc4ca7629b605dcb4..aa5f54f4bc180ae94bc033bceeb4da21a9c017d6 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.0aa.  Last change: 2006 Feb 24
+*eval.txt*      For Vim version 7.0aa.  Last change: 2006 Feb 25
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1354,8 +1354,9 @@ v:lc_time	The current locale setting for time messages of the runtime
 
 						*v:lnum* *lnum-variable*
 v:lnum		Line number for the 'foldexpr' |fold-expr| and 'indentexpr'
-		expressions.  Only valid while one of these expressions is
-		being evaluated.  Read-only when in the |sandbox|.
+		expressions, tab page number for 'guitablabel'.  Only valid
+		while one of these expressions is being evaluated.  Read-only
+		when in the |sandbox|.
 
 					*v:prevcount* *prevcount-variable*
 v:prevcount	The count given for the last but one Normal mode command.
@@ -4599,7 +4600,8 @@ virtcol({expr})						*virtcol()*
 		the <Tab>.  For example, for a <Tab> in column 1, with 'ts'
 		set to 8, it returns 8.
 		For the use of {expr} see |col()|.  Additionally you can use
-		[lnum, col]: a |List| with the line and column number.
+		[lnum, col]: a |List| with the line and column number.  When
+		"lnum" or "col" is out of range then virtcol() returns zero.
 		For the byte position use |col()|.
 		When Virtual editing is active in the current mode, a position
 		beyond the end of the line can be returned. |'virtualedit'|
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 122b26d5e609fd18b9ee9a896126dc356b40dc0a..5cd614981a029cfb2dcf1d05b23db6f491cb9703 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*	For Vim version 7.0aa.  Last change: 2006 Feb 24
+*options.txt*	For Vim version 7.0aa.  Last change: 2006 Feb 25
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -3249,8 +3249,9 @@ A jump table for the options with a short description can be found at |Q_op|.
 	  'c'	Use console dialogs instead of popup dialogs for simple
 		choices.
 
-	  'e'	Add tab pages when indicated with 'showtabpages'.  When 'e' is
-	  	missing a non-GUI tab pages line may be used.
+	  'e'	Add tab pages when indicated with 'showtabpages'.
+		'guitablabel' can be used to change the text in the labels.
+		When 'e' is missing a non-GUI tab pages line may be used.
 
 	  'f'	Foreground: Don't use fork() to detach the GUI from the shell
 		where it was started.  Use this for programs that wait for the
@@ -3312,6 +3313,18 @@ A jump table for the options with a short description can be found at |Q_op|.
 	Only in the GUI: If on, an attempt is made to open a pseudo-tty for
 	I/O to/from shell commands.  See |gui-pty|.
 
+						*'guitablabel'* *'gtl'*
+'guitablabel' 'gtl'	string	(default empty)
+			global
+			{not in Vi}
+	When nonempty describes the text to use in a label of the GUI tab
+	pages line.  When empty Vim will use a default label. See
+	|setting-guitablabel| for more info.
+
+	Only used when the GUI tab pages line is displayed.  'e' must be
+	present in 'guioptions'.  For the non-GUI tab pages line 'tabline' is
+	used.
+
 						*'helpfile'* *'hf'*
 'helpfile' 'hf'		string	(default (MSDOS)  "$VIMRUNTIME\doc\help.txt"
 					 (others) "$VIMRUNTIME/doc/help.txt")
@@ -6282,7 +6295,9 @@ A jump table for the options with a short description can be found at |Q_op|.
 	tab pages line.  See |setting-tabline| for more info.
 
 	The tab pages line only appears as specified with the 'showtabline'
-	option and only when there is no GUI implementation for tabs.
+	option and only when there is no GUI tab line.  When 'e' is in
+	'guioptions' and the GUI supports a tab line 'guitablabel' is used
+	instead.
 
 	The value is evaluated like with 'statusline'.  You can use
 	|tabpagenr()|, |tabpagewinnr()| and |tabpagebuflist()| to figure out
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 015ac258a297f3e225d1948947d8d38944fbee14..c96dccc6e43d3e39a141a5f569ab2025db3b2770 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -254,6 +254,7 @@ $VIMRUNTIME	starting.txt	/*$VIMRUNTIME*
 'graphic'	vi_diff.txt	/*'graphic'*
 'grepformat'	options.txt	/*'grepformat'*
 'grepprg'	options.txt	/*'grepprg'*
+'gtl'	options.txt	/*'gtl'*
 'guicursor'	options.txt	/*'guicursor'*
 'guifont'	options.txt	/*'guifont'*
 'guifontset'	options.txt	/*'guifontset'*
@@ -261,6 +262,7 @@ $VIMRUNTIME	starting.txt	/*$VIMRUNTIME*
 'guiheadroom'	options.txt	/*'guiheadroom'*
 'guioptions'	options.txt	/*'guioptions'*
 'guipty'	options.txt	/*'guipty'*
+'guitablabel'	options.txt	/*'guitablabel'*
 'hardtabs'	vi_diff.txt	/*'hardtabs'*
 'helpfile'	options.txt	/*'helpfile'*
 'helpheight'	options.txt	/*'helpheight'*
@@ -1481,6 +1483,7 @@ $VIMRUNTIME	starting.txt	/*$VIMRUNTIME*
 08.6	usr_08.txt	/*08.6*
 08.7	usr_08.txt	/*08.7*
 08.8	usr_08.txt	/*08.8*
+08.9	usr_08.txt	/*08.9*
 09.1	usr_09.txt	/*09.1*
 09.2	usr_09.txt	/*09.2*
 09.3	usr_09.txt	/*09.3*
@@ -2648,10 +2651,16 @@ $VIMRUNTIME	starting.txt	/*$VIMRUNTIME*
 :tabNext	tabpage.txt	/*:tabNext*
 :tabc	tabpage.txt	/*:tabc*
 :tabclose	tabpage.txt	/*:tabclose*
+:tabd	tabpage.txt	/*:tabd*
+:tabdo	tabpage.txt	/*:tabdo*
 :tabe	tabpage.txt	/*:tabe*
 :tabedit	tabpage.txt	/*:tabedit*
 :tabf	tabpage.txt	/*:tabf*
 :tabfind	tabpage.txt	/*:tabfind*
+:tabfir	tabpage.txt	/*:tabfir*
+:tabfirst	tabpage.txt	/*:tabfirst*
+:tabl	tabpage.txt	/*:tabl*
+:tablast	tabpage.txt	/*:tablast*
 :tabm	tabpage.txt	/*:tabm*
 :tabmove	tabpage.txt	/*:tabmove*
 :tabn	tabpage.txt	/*:tabn*
@@ -2661,6 +2670,8 @@ $VIMRUNTIME	starting.txt	/*$VIMRUNTIME*
 :tabonly	tabpage.txt	/*:tabonly*
 :tabp	tabpage.txt	/*:tabp*
 :tabprevious	tabpage.txt	/*:tabprevious*
+:tabr	tabpage.txt	/*:tabr*
+:tabrewind	tabpage.txt	/*:tabrewind*
 :tabs	tabpage.txt	/*:tabs*
 :tag	tagsrch.txt	/*:tag*
 :tags	tagsrch.txt	/*:tags*
@@ -6592,6 +6603,7 @@ setloclist()	eval.txt	/*setloclist()*
 setqflist()	eval.txt	/*setqflist()*
 setreg()	eval.txt	/*setreg()*
 setting-guifont	gui.txt	/*setting-guifont*
+setting-guitablabel	tabpage.txt	/*setting-guitablabel*
 setting-tabline	tabpage.txt	/*setting-tabline*
 setwinvar()	eval.txt	/*setwinvar()*
 sftp	pi_netrw.txt	/*sftp*
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index a7b85851742fa94936286edf2fcff1f91c3a8651..2a3cc2a584bd444868f47ac4e9a16a71098c6730 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2006 Feb 23
+" Last Change:	2006 Feb 25
 
 " Listen very carefully, I will say this only once
 if exists("did_load_filetypes")
@@ -1664,7 +1664,7 @@ fun! s:FTtex()
     if line =~ '^\s*\\\%(documentclass\>\|usepackage\>\|begin{\)'
       setf tex
       return
-    elseif line =~ '^\s*\\\%(start\l\+\|setup\l\+\|usemodule\)\>'
+    elseif line =~ '^\s*\\\%(start\l\+\|setup\l\+\|usemodule\|enablemode\>\|enableregime\>\|setvariables\>\|useencoding\>\|usesymbols\>\|stel\l\+\|verwende\l\+\|stel\l\+\|gebruik\l\+\|usa\l\+\|imposta\l\+\|regle\l\+\|utilisemodule\>\)\>'
       setf context
       return
     endif
diff --git a/runtime/menu.vim b/runtime/menu.vim
index 9dc3766ec58cd20763d3636b0ff4f49cb778810f..056a26fa26b173293d653e0461a3e6f74649cc14 100644
--- 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:	2006 Feb 02
+" Last Change:	2006 Feb 25
 
 " 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.
@@ -98,6 +98,7 @@ endfun
 " File menu
 an 10.310 &File.&Open\.\.\.<Tab>:e		:browse confirm e<CR>
 an 10.320 &File.Sp&lit-Open\.\.\.<Tab>:sp	:browse sp<CR>
+an 10.320 &File.Open\ Tab\.\.\.<Tab>:tabnew	:browse tabnew<CR>
 an 10.325 &File.&New<Tab>:enew			:confirm enew<CR>
 an <silent> 10.330 &File.&Close<Tab>:close
 	\ :if winheight(2) < 0 <Bar>
diff --git a/src/globals.h b/src/globals.h
index 1263e818382d154c01e5e9d4c79ba9dfe3590fd2..8acd3696ddd115b147a65c22da2a8ef38455f475 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -438,6 +438,12 @@ EXTERN int force_menu_update INIT(= FALSE);
 # ifdef FEAT_GUI_TABLINE
 /* Tab in tab pages line just selected, set by check_termcode() */
 EXTERN int	    current_tab;
+
+/* Menu entry in tab pages line menu just selected, set by check_termcode() */
+EXTERN int	    current_tabmenu;
+#  define TABLINE_MENU_CLOSE	1
+#  define TABLINE_MENU_NEW	2
+#  define TABLINE_MENU_OPEN	3
 # endif
 
 /* Scrollbar moved and new value, set by check_termcode() */
@@ -1200,6 +1206,11 @@ EXTERN option_table_T printer_opts[OPT_PRINT_NUM_OPTIONS]
 # define PRT_UNIT_NAMES {"pc", "in", "mm", "pt"}
 #endif
 
+#if defined(FEAT_PRINTER) || defined(FEAT_WINDOWS)
+/* Page number used for %N in 'pageheader' and 'guitablabel'. */
+EXTERN linenr_T printer_page_num;
+#endif
+
 #ifdef FEAT_XCLIPBOARD
 EXTERN char	*xterm_display INIT(= NULL);	/* xterm display name; points
 						   into argv[] */
diff --git a/src/hardcopy.c b/src/hardcopy.c
index a467bbcad52a3c4873860df251bdbb0305a694b4..2bdeb4e2c601fb6da0fd2d515159f941061839c0 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -394,14 +394,6 @@ prt_line_number(psettings, page_line, lnum)
     }
 }
 
-static linenr_T printer_page_num;
-
-    int
-get_printer_page_num()
-{
-    return printer_page_num;
-}
-
 /*
  * Get the currently effective header height.
  */
diff --git a/src/ops.c b/src/ops.c
index c9a4dd2a70c5c7c3fce4d43cab04e9967eab39d1..ab91e31a00b1e83faa8180b6ca55f8f547915a7d 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -5494,6 +5494,7 @@ clip_get_selection(cbd)
 	y_previous = old_y_previous;
 	y_current = old_y_current;
 	curwin->w_cursor = old_cursor;
+	changed_cline_bef_curs();   /* need to update w_virtcol et al */
 	curwin->w_curswant = old_curswant;
 	curwin->w_set_curswant = old_set_curswant;
 	curbuf->b_op_start = old_op_start;
@@ -6133,7 +6134,9 @@ cursor_pos_info()
 		oparg.block_mode = TRUE;
 		oparg.op_type = OP_NOP;
 		getvcols(curwin, &min_pos, &max_pos,
-			&oparg.start_vcol, &oparg.end_vcol);
+					  &oparg.start_vcol, &oparg.end_vcol);
+		if (curwin->w_curswant == MAXCOL)
+		    oparg.end_vcol = MAXCOL;
 		/* Swap the start, end vcol if needed */
 		if (oparg.end_vcol < oparg.start_vcol)
 		{
@@ -6231,10 +6234,10 @@ cursor_pos_info()
 #ifdef FEAT_VISUAL
 	if (VIsual_active)
 	{
-	    if (VIsual_mode == Ctrl_V)
+	    if (VIsual_mode == Ctrl_V && curwin->w_curswant < MAXCOL)
 	    {
 		getvcols(curwin, &min_pos, &max_pos, &min_pos.col,
-			&max_pos.col);
+								&max_pos.col);
 		sprintf((char *)buf1, _("%ld Cols; "),
 			(long)(oparg.end_vcol - oparg.start_vcol + 1));
 	    }
diff --git a/src/option.c b/src/option.c
index d32cf5e9d38052889d523fdc40eba152ec1afc9b..3d9c77849d87718696c625fa4fb744abc4ffc691 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1115,6 +1115,15 @@ static struct vimoption
 			    (char_u *)NULL, PV_NONE,
 #endif
 			    {(char_u *)TRUE, (char_u *)0L}},
+    {"guitablabel",  "gtl", P_STRING|P_VI_DEF,
+#if defined(FEAT_GUI_TABLINE)
+			    (char_u *)&p_gtl, PV_NONE,
+			    {(char_u *)"", (char_u *)0L}
+#else
+			    (char_u *)NULL, PV_NONE,
+			    {(char_u *)NULL, (char_u *)0L}
+#endif
+				    },
     {"hardtabs",    "ht",   P_NUM|P_VI_DEF,
 			    (char_u *)NULL, PV_NONE,
 			    {(char_u *)0L, (char_u *)0L}},
@@ -5838,6 +5847,12 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
 	gui_init_which_components(oldval);
 #endif
 
+#if defined(FEAT_GUI_TABLINE)
+    /* 'guitablabel' */
+    else if (varp == &p_gtl)
+	gui_update_tabline();
+#endif
+
 #if defined(FEAT_MOUSE_TTY) && (defined(UNIX) || defined(VMS))
     /* 'ttymouse' */
     else if (varp == &p_ttym)
diff --git a/src/option.h b/src/option.h
index 54ae88949369f9b56518defd31e29ab3dbe99902..b59c0e21d9412efa189c5d4649e1f04d13140851 100644
--- a/src/option.h
+++ b/src/option.h
@@ -515,6 +515,7 @@ EXTERN char_u	*p_mouseshape;	/* 'mouseshape' */
 #endif
 #if defined(FEAT_GUI)
 EXTERN char_u	*p_go;		/* 'guioptions' */
+EXTERN char_u	*p_gtl;		/* 'guitablabel' */
 #endif
 EXTERN char_u	*p_hf;		/* 'helpfile' */
 #ifdef FEAT_WINDOWS
diff --git a/src/screen.c b/src/screen.c
index 692318c29760a131fa38d544bd3717d394d5385f..adedce9ed4ad901e0566669366effc58415c6e1a 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -6167,10 +6167,10 @@ next_search_hl(win, shl, lnum, mincol)
 		|| (shl->rm.endpos[0].lnum == 0
 		    && shl->rm.endpos[0].col <= shl->rm.startpos[0].col))
 	{
-	    char_u	*ml = ml_get_buf(shl->buf, lnum, FALSE);
+	    char_u	*ml;
 
 	    matchcol = shl->rm.startpos[0].col;
-	    ml += matchcol;
+	    ml = ml_get_buf(shl->buf, lnum, FALSE) + matchcol;
 	    if (*ml == NUL)
 	    {
 		++matchcol;
diff --git a/src/term.c b/src/term.c
index 596de514a2430fc100353c778c3597137dc854da..69b0c6cb743f80164ba8cadee39cb947e33c52c9 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4792,12 +4792,23 @@ check_termcode(max_offset, buf, buflen)
 # ifdef FEAT_GUI_TABLINE
 	else if (key_name[0] == (int)KS_TABLINE)
 	{
+	    /* Selecting tabline tab or using its menu. */
 	    num_bytes = get_bytes_from_buf(tp + slen, bytes, 1);
 	    if (num_bytes == -1)
 		return -1;
 	    current_tab = (int)bytes[0];
 	    slen += num_bytes;
 	}
+	else if (key_name[0] == (int)KS_TABMENU)
+	{
+	    /* Selecting tabline tab or using its menu. */
+	    num_bytes = get_bytes_from_buf(tp + slen, bytes, 2);
+	    if (num_bytes == -1)
+		return -1;
+	    current_tab = (int)bytes[0];
+	    current_tabmenu = (int)bytes[1];
+	    slen += num_bytes;
+	}
 # endif
 # ifndef USE_ON_FLY_SCROLL
 	else if (key_name[0] == (int)KS_VER_SCROLLBAR)
diff --git a/src/version.h b/src/version.h
index 1cffc094aa02ef73c80a3a6e32018473e12a5674..6e77c3c9317c1cecb36337e657cfb16c1d49959a 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 (2006 Feb 24)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 24, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 25)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 25, compiled "