forked from aniani/vim
updated for version 7.0112
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 20
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -30,37 +30,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
About HTML tag pairing: http://www.w3.org/TR/html4/index/elements.html
|
||||
|
||||
":e *.foo" completion with file name starting with "+" should be escaped.
|
||||
|
||||
VMS patch for term.c also in Vim 6.3 (Zoltan Arpadffy)
|
||||
|
||||
Make_cyg.mak files for Vim 6.3 from Tony Mechelynck?
|
||||
|
||||
Add extra list of file locations. Can be used with:
|
||||
:ltag list of matching tags, like :tselect
|
||||
|
||||
:lnext next location
|
||||
:lprevious :lNext previous location
|
||||
:lnfile location in next file
|
||||
:lNfile :lpfile location in previous file
|
||||
:lrewind :lfirst first location
|
||||
:llast last location
|
||||
:ll [N] go to location N (current one if N omitted)
|
||||
:lwindow open window with locations (separate from quickfix window)
|
||||
:lopen open window with locations
|
||||
:lclose close window with locations
|
||||
:llist list locations
|
||||
:lfile read locations from file using 'errorformat'
|
||||
:lgetfile idem, don't jump to first one
|
||||
:lbuffer idem, from current buffer.
|
||||
|
||||
Win32: Balloon text can't contain line break.
|
||||
Hints for multiline tooltips from Alexei Alexandrov (2005 Mar 26)
|
||||
Patch from Sergey Khorev, 2005 Apr 11
|
||||
Add has("balloon_multiline")
|
||||
|
||||
Win32: Crash when pasting Simplified Chinese in utf-8. (rainux, 2005 June 20)
|
||||
|
||||
Netrw plugin problems:
|
||||
@@ -268,6 +237,25 @@ Also place vimtutor.bat in %windir%?
|
||||
|
||||
Add gui_mch_browsedir() for Motif, KDE and Mac OS/X.
|
||||
|
||||
Add extra list of file locations. A bit like the quickfix list, but there is
|
||||
one per window. Can be used with:
|
||||
:ltag list of matching tags, like :tselect
|
||||
Commands to use the location list:
|
||||
:lnext next location
|
||||
:lprevious :lNext previous location
|
||||
:lnfile location in next file
|
||||
:lNfile :lpfile location in previous file
|
||||
:lrewind :lfirst first location
|
||||
:llast last location
|
||||
:ll [N] go to location N (current one if N omitted)
|
||||
:lwindow open window with locations (separate from quickfix window)
|
||||
:lopen open window with locations
|
||||
:lclose close window with locations
|
||||
:llist list locations
|
||||
:lfile read locations from file using 'errorformat'
|
||||
:lgetfile idem, don't jump to first one
|
||||
:lbuffer idem, from current buffer.
|
||||
|
||||
7 Add a ":cstring" command. Works like ":cfile" but reads from a string
|
||||
variable. Also accept a list variable? Patch from Yegappan Lakshmanan.
|
||||
2005 Feb 17 Now it's ":cexpr".
|
||||
@@ -3137,6 +3125,8 @@ Debug mode:
|
||||
Various improvements:
|
||||
7 [t to move to previous xml/html tag (like "vatov"), ]t to move to next
|
||||
("vatv").
|
||||
7 [< to move to previous xml/html tag, e.g., previous <li>. ]< to move to
|
||||
next <li>, ]< to next </li>, [< to previous </li>.
|
||||
8 Add ":rename" command: rename the file of the current buffer and rename
|
||||
the buffer. Buffer may be modified.
|
||||
- Perhaps ":cexpr" could read errors from a list?
|
||||
|
@@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2005 Jul 20
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2005 Jul 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -367,7 +367,7 @@ New functions: ~
|
||||
|foldtextresult()| the text displayed for a closed fold at line "lnum"
|
||||
|function()| make a Funcref out of a function name
|
||||
|get()| get an item from a List or Dictionary
|
||||
|getbufline()| get a line or list of lines from a specified buffer
|
||||
|getbufline()| get a list of lines from a specified buffer
|
||||
(Yegappan Lakshmanan)
|
||||
|getfontname()| get actual font name being used
|
||||
|getfperm()| get file permission string (Nikolai Weibull)
|
||||
@@ -695,6 +695,9 @@ Added the "customlist" completion argument to a user-defined command. The
|
||||
user-defined completion function should return the completion candidates as a
|
||||
Vim List and the returned results are not filtered by Vim.
|
||||
|
||||
Win32: Balloons can have multiple lines if common controls supports it.
|
||||
(Sergey Khorev)
|
||||
|
||||
==============================================================================
|
||||
COMPILE TIME CHANGES *compile-changes-7*
|
||||
|
||||
@@ -1190,4 +1193,8 @@ the global value.
|
||||
Win32: When using the "Edit with Vim" entry the file name was limited to about
|
||||
200 characters.
|
||||
|
||||
When using command line completion for ":e *foo" and the file "+foo" exists
|
||||
the resulting command ":e +foo" doesn't work. Now insert a backslash: ":e
|
||||
\+foo".
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
114
src/eval.c
114
src/eval.c
@@ -9078,27 +9078,44 @@ f_get(argvars, rettv)
|
||||
copy_tv(tv, rettv);
|
||||
}
|
||||
|
||||
static void get_buffer_lines __ARGS((buf_T *buf, linenr_T start, linenr_T end, typval_T *rettv));
|
||||
static void get_buffer_lines __ARGS((buf_T *buf, linenr_T start, linenr_T end, int retlist, typval_T *rettv));
|
||||
|
||||
/*
|
||||
* Get line or list of lines from buffer "buf" into "rettv".
|
||||
* Return a range (from start to end) of lines in rettv from the specified
|
||||
* buffer.
|
||||
* If 'retlist' is TRUE, then the lines are returned as a Vim List.
|
||||
*/
|
||||
static void
|
||||
get_buffer_lines(buf, start, end, rettv)
|
||||
get_buffer_lines(buf, start, end, retlist, rettv)
|
||||
buf_T *buf;
|
||||
linenr_T start;
|
||||
linenr_T end;
|
||||
int retlist;
|
||||
typval_T *rettv;
|
||||
{
|
||||
char_u *p;
|
||||
list_T *l;
|
||||
list_T *l = NULL;
|
||||
listitem_T *li;
|
||||
|
||||
if (start < 0)
|
||||
rettv->vval.v_number = 0; /* failure; error message already given */
|
||||
else if (end == 0)
|
||||
if (retlist)
|
||||
{
|
||||
l = list_alloc();
|
||||
if (l == NULL)
|
||||
return;
|
||||
|
||||
rettv->vval.v_list = l;
|
||||
rettv->v_type = VAR_LIST;
|
||||
++l->lv_refcount;
|
||||
}
|
||||
else
|
||||
rettv->vval.v_number = 0;
|
||||
|
||||
if (buf == NULL || buf->b_ml.ml_mfp == NULL || start < 0)
|
||||
return;
|
||||
|
||||
if (!retlist)
|
||||
{
|
||||
/* getline(lnum): return one line as a string */
|
||||
if (start >= 1 && start <= buf->b_ml.ml_line_count)
|
||||
p = ml_get_buf(buf, start, FALSE);
|
||||
else
|
||||
@@ -9110,35 +9127,22 @@ get_buffer_lines(buf, start, end, rettv)
|
||||
else
|
||||
{
|
||||
if (end < start)
|
||||
return;
|
||||
|
||||
if (start < 1)
|
||||
start = 1;
|
||||
if (end > buf->b_ml.ml_line_count)
|
||||
end = buf->b_ml.ml_line_count;
|
||||
while (start <= end)
|
||||
{
|
||||
if (end >= 0) /* else: error message already given */
|
||||
EMSG(_(e_invrange));
|
||||
rettv->vval.v_number = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
l = list_alloc();
|
||||
if (l != NULL)
|
||||
{
|
||||
if (start < 1)
|
||||
start = 1;
|
||||
if (end > buf->b_ml.ml_line_count)
|
||||
end = buf->b_ml.ml_line_count;
|
||||
while (start <= end)
|
||||
{
|
||||
li = listitem_alloc();
|
||||
if (li == NULL)
|
||||
break;
|
||||
list_append(l, li);
|
||||
li->li_tv.v_type = VAR_STRING;
|
||||
li->li_tv.v_lock = 0;
|
||||
li->li_tv.vval.v_string =
|
||||
vim_strsave(ml_get_buf(buf, start++, FALSE));
|
||||
}
|
||||
rettv->vval.v_list = l;
|
||||
rettv->v_type = VAR_LIST;
|
||||
++l->lv_refcount;
|
||||
}
|
||||
li = listitem_alloc();
|
||||
if (li == NULL)
|
||||
break;
|
||||
list_append(l, li);
|
||||
li->li_tv.v_type = VAR_STRING;
|
||||
li->li_tv.v_lock = 0;
|
||||
li->li_tv.vval.v_string =
|
||||
vim_strsave(ml_get_buf(buf, start++, FALSE));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9160,17 +9164,12 @@ f_getbufline(argvars, rettv)
|
||||
buf = get_buf_tv(&argvars[0]);
|
||||
--emsg_off;
|
||||
|
||||
if (buf == NULL || buf->b_ml.ml_mfp == NULL)
|
||||
rettv->vval.v_number = 0;
|
||||
lnum = get_tv_lnum(&argvars[1]);
|
||||
if (argvars[2].v_type == VAR_UNKNOWN)
|
||||
end = lnum;
|
||||
else
|
||||
{
|
||||
lnum = get_tv_lnum(&argvars[1]);
|
||||
if (argvars[2].v_type == VAR_UNKNOWN)
|
||||
end = lnum;
|
||||
else
|
||||
end = get_tv_lnum(&argvars[2]);
|
||||
get_buffer_lines(buf, lnum, end, rettv);
|
||||
}
|
||||
end = get_tv_lnum(&argvars[2]);
|
||||
get_buffer_lines(buf, lnum, end, TRUE, rettv);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -9338,7 +9337,8 @@ f_getcwd(argvars, rettv)
|
||||
{
|
||||
rettv->vval.v_string = vim_strsave(cwd);
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
slash_adjust(rettv->vval.v_string);
|
||||
if (rettv->vval.v_string != NULL)
|
||||
slash_adjust(rettv->vval.v_string);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -9550,14 +9550,21 @@ f_getline(argvars, rettv)
|
||||
{
|
||||
linenr_T lnum;
|
||||
linenr_T end;
|
||||
int retlist;
|
||||
|
||||
lnum = get_tv_lnum(argvars);
|
||||
if (argvars[1].v_type == VAR_UNKNOWN)
|
||||
{
|
||||
end = 0;
|
||||
retlist = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
end = get_tv_lnum(&argvars[1]);
|
||||
retlist = TRUE;
|
||||
}
|
||||
|
||||
get_buffer_lines(curbuf, lnum, end, rettv);
|
||||
get_buffer_lines(curbuf, lnum, end, retlist, rettv);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -9905,6 +9912,9 @@ f_has(argvars, rettv)
|
||||
#endif
|
||||
#ifdef FEAT_BEVAL
|
||||
"balloon_eval",
|
||||
# ifndef FEAT_GUI_W32 /* other GUIs always have multiline balloons */
|
||||
"balloon_multiline",
|
||||
# endif
|
||||
#endif
|
||||
#if defined(SOME_BUILTIN_TCAPS) || defined(ALL_BUILTIN_TCAPS)
|
||||
"builtin_terms",
|
||||
@@ -10285,6 +10295,10 @@ f_has(argvars, rettv)
|
||||
n = has_patch(atoi((char *)name + 5));
|
||||
else if (STRICMP(name, "vim_starting") == 0)
|
||||
n = (starting != 0);
|
||||
#if defined(FEAT_BEVAL) && defined(FEAT_GUI_W32)
|
||||
else if (STRICMP(name, "balloon_multiline") == 0)
|
||||
n = multiline_balloon_available();
|
||||
#endif
|
||||
#ifdef DYNAMIC_TCL
|
||||
else if (STRICMP(name, "tcl") == 0)
|
||||
n = tcl_enabled(FALSE);
|
||||
@@ -14388,9 +14402,9 @@ f_tr(argvars, rettv)
|
||||
char_u *tostr;
|
||||
char_u *p;
|
||||
#ifdef FEAT_MBYTE
|
||||
int inlen;
|
||||
int fromlen;
|
||||
int tolen;
|
||||
int inlen;
|
||||
int fromlen;
|
||||
int tolen;
|
||||
int idx;
|
||||
char_u *cpstr;
|
||||
int cplen;
|
||||
|
@@ -2917,7 +2917,8 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags)
|
||||
# ifdef USE_LONG_FNAME
|
||||
if (USE_LONG_FNAME)
|
||||
# endif
|
||||
fname_case(sfname, 0); /* set correct case for short file name */
|
||||
if (sfname != NULL)
|
||||
fname_case(sfname, 0); /* set correct case for sfname */
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_LISTCMDS
|
||||
|
19
src/menu.c
19
src/menu.c
@@ -63,7 +63,7 @@ static char_u menu_mode_chars[] = {'n', 'v', 'o', 'i', 'c', 't'};
|
||||
|
||||
static char_u e_notsubmenu[] = N_("E327: Part of menu-item path is not sub-menu");
|
||||
static char_u e_othermode[] = N_("E328: Menu only exists in another mode");
|
||||
static char_u e_nomenu[] = N_("E329: No menu of that name");
|
||||
static char_u e_nomenu[] = N_("E329: No menu \"%s\"");
|
||||
|
||||
#ifdef FEAT_TOOLBAR
|
||||
static const char *toolbar_names[] =
|
||||
@@ -841,7 +841,7 @@ menu_nable_recurse(menu, name, modes, enable)
|
||||
}
|
||||
if (*name != NUL && *name != '*' && menu == NULL)
|
||||
{
|
||||
EMSG(_(e_nomenu));
|
||||
EMSG2(_(e_nomenu), name);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@@ -934,7 +934,7 @@ remove_menu(menup, name, modes, silent)
|
||||
if (menu == NULL)
|
||||
{
|
||||
if (!silent)
|
||||
EMSG(_(e_nomenu));
|
||||
EMSG2(_(e_nomenu), name);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@@ -1079,7 +1079,7 @@ show_menus(path_name, modes)
|
||||
}
|
||||
if (menu == NULL)
|
||||
{
|
||||
EMSG(_(e_nomenu));
|
||||
EMSG2(_(e_nomenu), name);
|
||||
vim_free(path_name);
|
||||
return FAIL;
|
||||
}
|
||||
@@ -1396,6 +1396,7 @@ get_menu_names(xp, idx)
|
||||
/*
|
||||
* Skip over this element of the menu path and return the start of the next
|
||||
* element. Any \ and ^Vs are removed from the current element.
|
||||
* "name" may be modified.
|
||||
*/
|
||||
char_u *
|
||||
menu_name_skip(name)
|
||||
@@ -1872,6 +1873,16 @@ gui_show_popupmenu()
|
||||
return;
|
||||
mode = menu_mode_chars[mode];
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
{
|
||||
char_u ename[2];
|
||||
|
||||
ename[0] = mode;
|
||||
ename[1] = NUL;
|
||||
apply_autocmds(EVENT_MENUPOPUP, ename, NULL, FALSE, curbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (menu = root_menu; menu != NULL; menu = menu->next)
|
||||
if (STRNCMP("PopUp", menu->name, 5) == 0 && menu->name[5] == mode)
|
||||
break;
|
||||
|
Reference in New Issue
Block a user