summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-02-25 21:52:33 +0000
committerBram Moolenaar <Bram@vim.org>2006-02-25 21:52:33 +0000
commit5c8837f9d7785c65c40f1485a779cc886750a5e9 (patch)
tree4f5ecb382974d741127e70d01975ee9046a5a90c /src
parentc542aef58df8ea69708d29d6fcbfa44f5eb3481d (diff)
updated for version 7.0207
Diffstat (limited to 'src')
-rw-r--r--src/globals.h11
-rw-r--r--src/hardcopy.c8
-rw-r--r--src/ops.c9
-rw-r--r--src/option.c15
-rw-r--r--src/option.h1
-rw-r--r--src/screen.c4
-rw-r--r--src/term.c11
-rw-r--r--src/version.h4
8 files changed, 48 insertions, 15 deletions
diff --git a/src/globals.h b/src/globals.h
index 1263e81838..8acd3696dd 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 a467bbcad5..2bdeb4e2c6 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 c9a4dd2a70..ab91e31a00 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 d32cf5e9d3..3d9c77849d 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 54ae889493..b59c0e21d9 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 692318c297..adedce9ed4 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 596de514a2..69b0c6cb74 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 1cffc094aa..6e77c3c931 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 "