updated for version 7.0207
diff --git a/src/globals.h b/src/globals.h
index 1263e81..8acd369 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -438,6 +438,12 @@
# 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 @@
# 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 a467bbc..2bdeb4e 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -394,14 +394,6 @@
}
}
-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 c9a4dd2..ab91e31 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -5494,6 +5494,7 @@
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 @@
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 @@
#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 d32cf5e..3d9c778 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1115,6 +1115,15 @@
(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 @@
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 54ae889..b59c0e2 100644
--- a/src/option.h
+++ b/src/option.h
@@ -515,6 +515,7 @@
#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 692318c..adedce9 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -6167,10 +6167,10 @@
|| (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 596de51..69b0c6c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4792,12 +4792,23 @@
# 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 1cffc09..6e77c3c 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 "