summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2006-02-25 21:52:33 +0000
committervimboss <devnull@localhost>2006-02-25 21:52:33 +0000
commit2b8fef2ecf98bb4851de7bdbc531377f6be759cf (patch)
tree4f5ecb382974d741127e70d01975ee9046a5a90c
parent6091b236b198ee382adcf1bef192257b1f05f7c6 (diff)
downloadvim-2b8fef2ecf98bb4851de7bdbc531377f6be759cf.tar.gz
updated for version 7.0207
-rw-r--r--runtime/doc/eval.txt10
-rw-r--r--runtime/doc/options.txt23
-rw-r--r--runtime/doc/tags12
-rw-r--r--runtime/filetype.vim4
-rw-r--r--runtime/menu.vim3
-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
13 files changed, 89 insertions, 26 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index edb2fc33..aa5f54f4 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 122b26d5..5cd61498 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 015ac258..c96dccc6 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 a7b85851..2a3cc2a5 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 9dc3766e..056a26fa 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 1263e818..8acd3696 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 a467bbca..2bdeb4e2 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 c9a4dd2a..ab91e31a 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 d32cf5e9..3d9c7784 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 54ae8894..b59c0e21 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 692318c2..adedce9e 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 596de514..69b0c6cb 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 1cffc094..6e77c3c9 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 "