mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
updated for version 7.0189
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Dec 18
|
||||
" Last Change: 2006 Jan 29
|
||||
|
||||
|
||||
" This function is used for the 'omnifunc' option.
|
||||
@ -55,7 +55,7 @@ function! ccomplete#Complete(findstart, base)
|
||||
|
||||
" Only one part, no "." or "->": complete from tags file.
|
||||
" When local completion is wanted CTRL-N would have been used.
|
||||
return map(taglist('^' . base), 'v:val["name"]')
|
||||
return map(taglist('^' . base), 's:Tag2item(v:val)')
|
||||
endif
|
||||
|
||||
" Find the variable items[0].
|
||||
@ -106,7 +106,7 @@ function! ccomplete#Complete(findstart, base)
|
||||
" type, add a "." or "->".
|
||||
if len(res) == 1 && res[0]['match'] == items[-1] && len(s:SearchMembers(res, [''])) > 0
|
||||
" If there is a '*' before the name use "->".
|
||||
if match(res[0]['tagline'], '\*\s*' . res[0]['match']) > 0
|
||||
if match(res[0]['tagline'], '\*\s*' . res[0]['match'] . '\>') > 0
|
||||
let res[0]['match'] .= '->'
|
||||
else
|
||||
let res[0]['match'] .= '.'
|
||||
@ -116,6 +116,25 @@ function! ccomplete#Complete(findstart, base)
|
||||
return map(res, 'v:val["match"]')
|
||||
endfunc
|
||||
|
||||
"
|
||||
" Turn the tag info "val" into an item for completion.
|
||||
" "val" is is an item in the list returned by taglist().
|
||||
function! s:Tag2item(val)
|
||||
if has_key(a:val, "kind") && a:val["kind"] == 'v'
|
||||
if len(s:SearchMembers([{'match': a:val["name"], 'dict': a:val}], [''])) > 0
|
||||
" If there is a '*' before the name use "->". This assumes the command
|
||||
" is a search pattern!
|
||||
if match(a:val['cmd'], '\*\s*' . a:val['name'] . '\>') > 0
|
||||
return a:val["name"] . '->'
|
||||
else
|
||||
return a:val["name"] . '.'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
return a:val["name"]
|
||||
endfunction
|
||||
|
||||
|
||||
" Find composing type in "lead" and match items[0] with it.
|
||||
" Repeat this recursively for items[1], if it's there.
|
||||
" Return the list of matches.
|
||||
@ -236,18 +255,34 @@ endfunction
|
||||
function! s:SearchMembers(matches, items)
|
||||
let res = []
|
||||
for i in range(len(a:matches))
|
||||
let line = a:matches[i]['tagline']
|
||||
let e = matchend(line, '\ttypename:')
|
||||
if e > 0
|
||||
" Use typename field
|
||||
let name = matchstr(line, '[^\t]*', e)
|
||||
let typename = ''
|
||||
if has_key(a:matches[i], 'dict')
|
||||
"if a:matches[i].dict['name'] == "gui"
|
||||
"echomsg string(a:matches[i].dict)
|
||||
"endif
|
||||
if has_key(a:matches[i].dict, 'typename')
|
||||
let typename = a:matches[i].dict['typename']
|
||||
endif
|
||||
let line = "\t" . a:matches[i].dict['cmd']
|
||||
else
|
||||
let line = a:matches[i]['tagline']
|
||||
let e = matchend(line, '\ttypename:')
|
||||
if e > 0
|
||||
" Use typename field
|
||||
let typename = matchstr(line, '[^\t]*', e)
|
||||
endif
|
||||
endif
|
||||
if typename != ''
|
||||
call extend(res, s:StructMembers(name, a:items))
|
||||
else
|
||||
" Use the search command (the declaration itself).
|
||||
let s = match(line, '\t\zs/^')
|
||||
if s > 0
|
||||
let e = match(line, a:matches[i]['match'], s)
|
||||
let e = match(line, '\<' . a:matches[i]['match'] . '\>', s)
|
||||
if e > 0
|
||||
"if a:matches[i].dict['name'] == "gui"
|
||||
"echomsg strpart(line, s, e - s)
|
||||
"endif
|
||||
call extend(res, s:Nextitem(strpart(line, s, e - s), a:items))
|
||||
endif
|
||||
endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2006 Jan 24
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2006 Jan 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -2374,6 +2374,8 @@ filter({expr}, {string}) *filter()*
|
||||
:let l = filter(copy(mylist), '& =~ "KEEP"')
|
||||
|
||||
< Returns {expr}, the List or Dictionary that was filtered.
|
||||
When an error is encountered while evaluating {string} no
|
||||
further items in {expr} are processed.
|
||||
|
||||
|
||||
finddir({name}[, {path}[, {count}]]) *finddir()*
|
||||
@ -2700,7 +2702,8 @@ getloclist({nr}) *getloclist()*
|
||||
Returns a list with all the entries in the location list for
|
||||
window {nr}. When {nr} is zero the current window is used.
|
||||
For a location list window, the displayed location list is
|
||||
returned. Otherwise, same as getqflist().
|
||||
returned. For an invalid window number {nr}, an empty list is
|
||||
returned. Otherwise, same as getqflist().
|
||||
|
||||
getqflist() *getqflist()*
|
||||
Returns a list with all the current quickfix errors. Each
|
||||
@ -3263,6 +3266,8 @@ map({expr}, {string}) *map()*
|
||||
:let tlist = map(copy(mylist), ' & . "\t"')
|
||||
|
||||
< Returns {expr}, the List or Dictionary that was filtered.
|
||||
When an error is encountered while evaluating {string} no
|
||||
further items in {expr} are processed.
|
||||
|
||||
|
||||
maparg({name}[, {mode}]) *maparg()*
|
||||
@ -3982,7 +3987,8 @@ setline({lnum}, {line}) *setline()*
|
||||
setloclist({nr}, {list} [, {action}]) *setloclist()*
|
||||
Create or replace or add to the location list for window {nr}.
|
||||
When {nr} is zero the current window is used. For a location
|
||||
list window, the displayed location list is modified.
|
||||
list window, the displayed location list is modified. For an
|
||||
invalid window number {nr}, -1 is returned.
|
||||
Otherwise, same as setqflist().
|
||||
|
||||
setqflist({list} [, {action}]) *setqflist()*
|
||||
@ -4411,16 +4417,16 @@ taglist({expr}) *taglist()*
|
||||
Returns a list of tags matching the regular expression {expr}.
|
||||
Each list item is a dictionary with at least the following
|
||||
entries:
|
||||
name name of the tag.
|
||||
filename name of the file where the tag is
|
||||
name Name of the tag.
|
||||
filename Name of the file where the tag is
|
||||
defined.
|
||||
cmd Ex command used to locate the tag in
|
||||
the file.
|
||||
kind type of the tag. The value for this
|
||||
kind Type of the tag. The value for this
|
||||
entry depends on the language specific
|
||||
kind values generated by the ctags
|
||||
tool.
|
||||
static a file specific tag. Refer to
|
||||
static A file specific tag. Refer to
|
||||
|static-tag| for more information.
|
||||
The "kind" entry is only available when using Exuberant ctags
|
||||
generated tags file. More entries may be present, depending
|
||||
|
@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
|
||||
*insert.txt* For Vim version 7.0aa. Last change: 2006 Jan 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -871,8 +871,8 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
|
||||
User defined completion *compl-function*
|
||||
|
||||
Completion is done by a function that can be defined by the user with the
|
||||
'completefunc' option. See the 'completefunc' help for how the function
|
||||
is called and an example.
|
||||
'completefunc' option. See below for how the function is called and an
|
||||
example |complete-functions|.
|
||||
|
||||
*i_CTRL-X_CTRL-U*
|
||||
CTRL-X CTRL-U Guess what kind of item is in front of the cursor and
|
||||
@ -890,7 +890,7 @@ Omni completion *compl-omni*
|
||||
Completion is done by a function that can be defined by the user with the
|
||||
'omnifunc' option. This is to be used for filetype-specific completion.
|
||||
|
||||
See the 'completefunc' help for how the function is called and an example.
|
||||
See below for how the function is called and an example |complete-functions|.
|
||||
For remarks about specific filetypes see |compl-omni-filetypes|.
|
||||
|
||||
*i_CTRL-X_CTRL-O*
|
||||
@ -952,6 +952,94 @@ CTRL-P Find previous match for words that start with the
|
||||
other contexts unless a double CTRL-X is used.
|
||||
|
||||
|
||||
FUNCTIONS FOR FINDING COMPLETIONS *complete-functions*
|
||||
|
||||
This applies to 'completefunc' and 'omnifunc'.
|
||||
|
||||
The function will be invoked with two arguments. First the function is called
|
||||
to find the start of the text to be completed. Secondly the function is
|
||||
called to actually find the matches.
|
||||
|
||||
On the first invocation the arguments are:
|
||||
a:findstart 1
|
||||
a:base empty
|
||||
|
||||
The function must return the column of where the completion starts. It must
|
||||
be a number between zero and the cursor column "col('.')". This involves
|
||||
looking at the characters just before the cursor and including those
|
||||
characters that could be part of the completed item. The text between this
|
||||
column and the cursor column will be replaced with the matches. Return -1 if
|
||||
no completion can be done.
|
||||
|
||||
On the second invocation the arguments are:
|
||||
a:findstart 0
|
||||
a:base the text with which matches should match, what was
|
||||
located in the first call (can be empty)
|
||||
|
||||
The function must return a List with the matching words. These matches
|
||||
usually include the "a:base" text. When there are no matches return an empty
|
||||
List. When one of the items in the list cannot be used as a string (e.g., a
|
||||
Dictionary) then an error message is given and further items in the list are
|
||||
not used.
|
||||
|
||||
When searching for matches takes some time call |complete_add()| to add each
|
||||
match to the total list. These matches should then not appear in the returned
|
||||
list! Call |complete_check()| now and then to allow the user to press a key
|
||||
while still searching for matches. Stop searching when it returns non-zero.
|
||||
|
||||
The function may move the cursor, it is restored afterwards. This option
|
||||
cannot be set from a |modeline| or in the |sandbox|, for security reasons.
|
||||
|
||||
An example that completes the names of the months: >
|
||||
fun! CompleteMonths(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
while start > 0 && line[start - 1] =~ '\a'
|
||||
let start -= 1
|
||||
endwhile
|
||||
return start
|
||||
else
|
||||
" find months matching with "a:base"
|
||||
let res = []
|
||||
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
|
||||
if m =~ '^' . a:base
|
||||
call add(res, m)
|
||||
endif
|
||||
endfor
|
||||
return res
|
||||
endif
|
||||
endfun
|
||||
set completefunc=CompleteMonths
|
||||
<
|
||||
The same, but now pretending searching for matches is slow: >
|
||||
fun! CompleteMonths(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
while start > 0 && line[start - 1] =~ '\a'
|
||||
let start -= 1
|
||||
endwhile
|
||||
return start
|
||||
else
|
||||
" find months matching with "a:base"
|
||||
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
|
||||
if m =~ '^' . a:base
|
||||
call complete_add(m)
|
||||
endif
|
||||
sleep 300m " simulate searching for next match
|
||||
if complete_check()
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
return []
|
||||
endif
|
||||
endfun
|
||||
set completefunc=CompleteMonths
|
||||
<
|
||||
|
||||
INSERT COMPLETION POPUP MENU *ins-completion-menu*
|
||||
*popupmenu-completion*
|
||||
Vim can display the matches in a simplistic popup menu.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2006 Jan 23
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2006 Jan 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1183,6 +1183,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
autocommands. {not available when compiled without the
|
||||
|+autocmd| feature}
|
||||
quickfix quickfix buffer, contains list of errors |:cwindow|
|
||||
or list of locations |:lwindow|
|
||||
help help buffer (you are not supposed to set this
|
||||
manually)
|
||||
|
||||
@ -1191,8 +1192,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
Be careful with changing this option, it can have many side effects!
|
||||
|
||||
A "quickfix" buffer is only used for the error list. This value is
|
||||
set by the |:cwindow| command and you are not supposed to change it.
|
||||
A "quickfix" buffer is only used for the error list and the location
|
||||
list. This value is set by the |:cwindow| and |:lwindow| commands and
|
||||
you are not supposed to change it.
|
||||
|
||||
"nofile" and "nowrite" buffers are similar:
|
||||
both: The buffer is not to be written to disk, ":w" doesn't
|
||||
@ -1611,90 +1613,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
or +insert_expand feature}
|
||||
This option specifies a function to be used for Insert mode completion
|
||||
with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U|
|
||||
See |complete-functions| for an explanation of how the function is
|
||||
invoked and what it should return.
|
||||
|
||||
The function will be invoked with two arguments. First the function
|
||||
is called to find the start of the text to be completed. Secondly the
|
||||
function is called to actually find the matches.
|
||||
|
||||
On the first invocation the arguments are:
|
||||
a:findstart 1
|
||||
a:base empty
|
||||
|
||||
The function must return the column of where the completion starts.
|
||||
It must be a number between zero and the cursor column "col('.')".
|
||||
This involves looking at the characters just before the cursor and
|
||||
including those characters that could be part of the completed item.
|
||||
The text between this column and the cursor column will be replaced
|
||||
with the matches. Return -1 if no completion can be done.
|
||||
|
||||
On the second invocation the arguments are:
|
||||
a:findstart 0
|
||||
a:base the text with which matches should match, what was
|
||||
located in the first call (can be empty)
|
||||
|
||||
The function must return a List with the matching words. These
|
||||
matches usually include the "a:base" text. When there are no matches
|
||||
return an empty List.
|
||||
|
||||
When searching for matches takes some time call |complete_add()| to
|
||||
add each match to the total list. These matches should then not
|
||||
appear in the returned list! Call |complete_check()| now and then to
|
||||
allow the user to press a key while still searching for matches. Stop
|
||||
searching when it returns non-zero.
|
||||
|
||||
The function may move the cursor, it is restored afterwards.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
An example that completes the names of the months: >
|
||||
fun! CompleteMonths(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
while start > 0 && line[start - 1] =~ '\a'
|
||||
let start -= 1
|
||||
endwhile
|
||||
return start
|
||||
else
|
||||
" find months matching with "a:base"
|
||||
let res = []
|
||||
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
|
||||
if m =~ '^' . a:base
|
||||
call add(res, m)
|
||||
endif
|
||||
endfor
|
||||
return res
|
||||
endif
|
||||
endfun
|
||||
set completefunc=CompleteMonths
|
||||
<
|
||||
The same, but now pretending searching for matches is slow: >
|
||||
fun! CompleteMonths(findstart, base)
|
||||
if a:findstart
|
||||
" locate the start of the word
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
while start > 0 && line[start - 1] =~ '\a'
|
||||
let start -= 1
|
||||
endwhile
|
||||
return start
|
||||
else
|
||||
" find months matching with "a:base"
|
||||
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
|
||||
if m =~ '^' . a:base
|
||||
call complete_add(m)
|
||||
endif
|
||||
sleep 300m " simulate searching for next match
|
||||
if complete_check()
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
return []
|
||||
endif
|
||||
endfun
|
||||
set completefunc=CompleteMonths
|
||||
<
|
||||
|
||||
*'completeopt'* *'cot'*
|
||||
'completeopt' 'cot' string (default: "menu")
|
||||
@ -4681,7 +4602,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
or +insert_expand feature}
|
||||
This option specifies a function to be used for Insert mode omni
|
||||
completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O|
|
||||
For the use of the function see 'completefunc'.
|
||||
See |complete-functions| for an explanation of how the function is
|
||||
invoked and what it should return.
|
||||
|
||||
|
||||
*'operatorfunc'* *'opfunc'*
|
||||
@ -5802,11 +5724,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{not in Vi}
|
||||
When on, a <Tab> in front of a line inserts blanks according to
|
||||
'shiftwidth'. 'tabstop' is used in other places. A <BS> will delete
|
||||
a 'shiftwidth' worth of space at the start of the line.
|
||||
When off a <Tab> always inserts blanks according to 'tabstop'.
|
||||
'shiftwidth' is only used for shifting text left or right
|
||||
|shift-left-right|.
|
||||
'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places. A
|
||||
<BS> will delete a 'shiftwidth' worth of space at the start of the
|
||||
line.
|
||||
When off a <Tab> always inserts blanks according to 'tabstop' or
|
||||
'softtabstop'. 'shiftwidth' is only used for shifting text left or
|
||||
right |shift-left-right|.
|
||||
What gets inserted (a Tab or spaces) depends on the 'expandtab'
|
||||
option. Also see |ins-expandtab|. When 'expandtab' is not set, the
|
||||
number of spaces is minimized by using <Tab>s.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Jan 26
|
||||
*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Jan 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -43,13 +43,18 @@ easy way to do this is with the |:make| command (see below). The
|
||||
compiler (see |errorformat| below).
|
||||
|
||||
*location-list* *E776*
|
||||
A location list is a window-local quickfix list. Each window can have a
|
||||
separate location list. A location list can be associated with only one
|
||||
window. When a window with a location list is split, the new window gets a
|
||||
copy of the location list. When there are no references to a location list,
|
||||
the location list is destroyed.
|
||||
A location list is similar to a quickfix list and contains a list of positions
|
||||
in files. A location list is associated with a window and each window can
|
||||
have a separate location list. A location list can be associated with only
|
||||
one window. The location list is independent of the quickfix list.
|
||||
|
||||
The following quickfix commands can be used:
|
||||
When a window with a location list is split, the new window gets a copy of the
|
||||
location list. When there are no references to a location list, the location
|
||||
list is destroyed.
|
||||
|
||||
The following quickfix commands can be used. The location list commands are
|
||||
similar to the quickfix commands, replacing the 'c' prefix in the quickfix
|
||||
command with 'l'.
|
||||
|
||||
*:cc*
|
||||
:cc[!] [nr] Display error [nr]. If [nr] is omitted, the same
|
||||
@ -265,7 +270,7 @@ on) is executed. See |QuickFixCmdPre| and |QuickFixCmdPost| for details.
|
||||
current window. Works only when the location list for
|
||||
the current window is present. You can have more than
|
||||
one location window opened at a time. Otherwise, it
|
||||
acts the same same as ":copen".
|
||||
acts the same as ":copen".
|
||||
|
||||
*:ccl* *:cclose*
|
||||
:ccl[ose] Close the quickfix window.
|
||||
@ -308,9 +313,9 @@ When the quickfix window has been filled, two autocommand events are
|
||||
triggered. First the 'filetype' option is set to "qf", which triggers the
|
||||
FileType event. Then the BufReadPost event is triggered. This can be used to
|
||||
perform some action on the listed errors. Example: >
|
||||
au BufReadPost quickfix setlocal nomodifiable
|
||||
\ | silent g/^/s//\=line(".")." "/
|
||||
\ | setlocal modifiable
|
||||
au BufReadPost quickfix setlocal modifiable
|
||||
\ | silent exe 'g/^/s//\=line(".")." "/'
|
||||
\ | setlocal nomodifiable
|
||||
This prepends the line number to each line. Note the use of "\=" in the
|
||||
substitute string of the ":s" command, which is used to evaluate an
|
||||
expression.
|
||||
@ -323,17 +328,26 @@ window to a file and use ":cfile" to have it parsed and used as the new error
|
||||
list.
|
||||
|
||||
*location-list-window*
|
||||
The location list window displays the entries in a location list. When
|
||||
opening a location list window, it is created just below the current window
|
||||
and displays the location list for the current window. The location list
|
||||
window is similar to the quickfix window, except that you can have more than
|
||||
one location list window opened at a time.
|
||||
The location list window displays the entries in a location list. When you
|
||||
open a location list window, it is created below the current window and
|
||||
displays the location list for the current window. The location list window
|
||||
is similar to the quickfix window, except that you can have more than one
|
||||
location list window open at a time.
|
||||
|
||||
When an entry is selected from the location list window, the file is opened in
|
||||
the window with the corresponding location list. If the window is not found,
|
||||
but the file is opened in another window, then cursor is moved to that window.
|
||||
Otherwise a new window is opened. The new window gets a copy of the location
|
||||
list.
|
||||
When you select a file from the location list window, the following steps are
|
||||
used to find a window to edit the file:
|
||||
|
||||
1. If a window with the location list displayed in the location list window is
|
||||
present, then the file is opened in that window.
|
||||
2. If the above step fails and if the file is already opened in another
|
||||
window, then that window is used.
|
||||
3. If the above step fails then an existing window showing a buffer with
|
||||
'buftype' not set is used.
|
||||
4. If the above step fails, then the file is edited in a new window.
|
||||
|
||||
In all of the above cases, if the location list for the selected window is not
|
||||
yet set, then it is set to the location list displayed in the location list
|
||||
window.
|
||||
|
||||
=============================================================================
|
||||
3. Using more than one list of errors *quickfix-error-lists*
|
||||
|
@ -5398,7 +5398,6 @@ hebrew hebrew.txt /*hebrew*
|
||||
hebrew.txt hebrew.txt /*hebrew.txt*
|
||||
help various.txt /*help*
|
||||
help-context help.txt /*help-context*
|
||||
help-tags tags 1
|
||||
help-translated various.txt /*help-translated*
|
||||
help-xterm-window various.txt /*help-xterm-window*
|
||||
help.txt help.txt /*help.txt*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2006 Jan 26
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2006 Jan 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -30,13 +30,27 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Truncating error message keeps one char too many, causes an empty line.
|
||||
|
||||
Variant of ":helpgrep" that uses a location list? How about:
|
||||
:lhelpgrep (use local list in help window, not current window)
|
||||
:lgrep
|
||||
:lvimgrep
|
||||
:lmake
|
||||
|
||||
ccomplete / omnicomplete:
|
||||
- Also add . or -> when completing struct members. use s:Tag2item()
|
||||
- When an option is set: In completion mode and the user types (identifier)
|
||||
characters, advance to the first match instead of removing the popup menu.
|
||||
If there is no match remove the selection. (Yegappan Lakshmanan)
|
||||
Keep the current list of all matches. Use the text typed (or completed) so
|
||||
far to make a second list with only matching entries.
|
||||
- Complete the longest common match instead of the first match?
|
||||
For all kinds of completions? Configurable?
|
||||
- Window resize when poup is displayed.
|
||||
Do this when "longest" is in 'completeopt'.
|
||||
Pressing CTRL-N or CTRL-P will get the whole match, as before.
|
||||
Need to postpone inserting anything until all matches have been found.
|
||||
Then add a completion item with the longest common string (after what was
|
||||
typed), if there is one.
|
||||
- When completing something that is a structure, add the "." or "->" right
|
||||
away. How to figure out if it's a pointer or not?
|
||||
- When a typedef or struct is local to a file only use it in that file?
|
||||
@ -52,11 +66,10 @@ ccomplete / omnicomplete:
|
||||
a specific selection (e.g, methods vs variables).
|
||||
- Provide a function to popup the menu, so that an insert mode mapping can
|
||||
start it (with a specific selection).
|
||||
- !_TAG_FILE_FORMAT and it's ilk are listed in the global completions
|
||||
Can't reproduce it right now...
|
||||
|
||||
spelling:
|
||||
- Also use the spelling dictionary for dictionary completion.
|
||||
When 'dictionary' is empty and/or when "kspell" is in 'complete'.
|
||||
- Use runtime/cleanadd script to cleanup .add files. When to invoke it?
|
||||
After deleting a word with "zw" and some timestamp difference perhaps?
|
||||
Store it as spell/cleanadd.vim.
|
||||
@ -3781,6 +3794,8 @@ Far future and "big" extensions:
|
||||
are reflected in each Vim immediately. Could work with local files but
|
||||
also over the internet. See http://www.codingmonkeys.de/subethaedit/.
|
||||
|
||||
When using "do" or ":diffget" in a buffer with changes in every line an extra
|
||||
empty line would appear.
|
||||
|
||||
vim:tw=78:sw=4:sts=4:ts=8:ft=help:norl:
|
||||
vim: set fo+=n :
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 26
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1624,4 +1624,9 @@ The command line was cleared to often when 'showmode' was set and ":silent
|
||||
normal vy" was used. Don't clear the command line unless the mode was
|
||||
actually displayed. Added the "mode_displayed" variable.
|
||||
|
||||
The "load session" toolbar item could not handle a space or other special
|
||||
characters in v:this_session.
|
||||
|
||||
":set sta ts=8 sw=4 sts=2" deleted 4 spaces halfway a line instead of 2.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
|
||||
*windows.txt* For Vim version 7.0aa. Last change: 2006 Jan 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -992,9 +992,11 @@ list of buffers. |unlisted-buffer|
|
||||
Split window and edit buffer for {filename} from the buffer
|
||||
list. This will also edit a buffer that is not in the buffer
|
||||
list, without setting the 'buflisted' flag.
|
||||
Note: If what you want to do is split the buffer, make a copy
|
||||
under another name, you can do it this way: >
|
||||
:w foobar | sp #
|
||||
|
||||
*:bn* *:bnext* *E87*
|
||||
:[N]bn[ext][!] [N]
|
||||
:[N]bn[ext][!] [N] *:bn* *:bnext* *E87*
|
||||
Go to [N]th next buffer in buffer list. [N] defaults to one.
|
||||
Wraps around the end of the buffer list.
|
||||
See |:buffer-!| for [!].
|
||||
@ -1089,9 +1091,10 @@ purposes. A few options can be set to change the behavior of a buffer:
|
||||
|
||||
A few useful kinds of a buffer:
|
||||
|
||||
quickfix Used to contain the error list. See |:cwindow|. This command
|
||||
sets the 'buftype' option to "quickfix". You are not supposed
|
||||
to change this! 'swapfile' is off.
|
||||
quickfix Used to contain the error list or the location list. See
|
||||
|:cwindow| and |:lwindow|. This command sets the 'buftype'
|
||||
option to "quickfix". You are not supposed to change this!
|
||||
'swapfile' is off.
|
||||
|
||||
help Contains a help file. Will only be created with the |:help|
|
||||
command. The flag that indicates a help buffer is internal
|
||||
|
@ -1,9 +1,9 @@
|
||||
" VHDL indent file ('93 syntax)
|
||||
" VHDL indent ('93 syntax)
|
||||
" Language: VHDL
|
||||
" Maintainer: Gerald Lai <laigera+vim?gmail.com>
|
||||
" Credits: N. J. Heo & Janez Stangelj
|
||||
" Version: 1.1
|
||||
" Last Change: 2006 Jan 25
|
||||
" Version: 1.2
|
||||
" Last Change: 2006 Jan 26
|
||||
" URL: http://www.vim.org/scripts/script.php?script_id=1450
|
||||
|
||||
" only load this indent file when no other was loaded
|
||||
if exists("b:did_indent")
|
||||
@ -78,6 +78,17 @@ function GetVHDLindent()
|
||||
" backup default
|
||||
let ind2 = ind
|
||||
|
||||
" indent: special; kill string so it would not affect other filters
|
||||
" keywords: "report" + string
|
||||
" where: anywhere in current or previous line
|
||||
let s0 = s:NC.'\<report\>\s*".*"'
|
||||
if curs =~? s0
|
||||
let curs = ""
|
||||
endif
|
||||
if prevs =~? s0
|
||||
let prevs = ""
|
||||
endif
|
||||
|
||||
" indent: previous line's comment position, otherwise follow next non-comment line if possible
|
||||
" keyword: "--"
|
||||
" where: start of current line
|
||||
@ -124,9 +135,9 @@ function GetVHDLindent()
|
||||
endif
|
||||
|
||||
" indent: align conditional/select statement
|
||||
" keywords: "<=" without ";" ending
|
||||
" where: anywhere in previous line
|
||||
if prevs =~ s:NC.'<=[^;]*'.s:ES
|
||||
" keywords: variable + "<=" without ";" ending
|
||||
" where: start of previous line
|
||||
if prevs =~? '^\s*\S\+\s*<=[^;]*'.s:ES
|
||||
return matchend(prevs, '<=\s*\ze.')
|
||||
endif
|
||||
|
||||
@ -156,13 +167,13 @@ function GetVHDLindent()
|
||||
let t = indent(pn)
|
||||
if ps !~ '^\s*--' && t < ind
|
||||
" make sure one of these is true
|
||||
" keywords: variable + "<=" without ";" ending
|
||||
" where: start of previous non-comment line
|
||||
" keywords: "generic", "map", "port"
|
||||
" where: anywhere in previous non-comment line
|
||||
" keyword: "("
|
||||
" where: start of previous non-comment line
|
||||
" keywords: "<=" without ";" ending
|
||||
" where: anywhere in previous non-comment line
|
||||
if m < 3 && ps !~ s:NC.'<=[^;]*'.s:ES
|
||||
if m < 3 && ps !~? '^\s*\S\+\s*<=[^;]*'.s:ES
|
||||
if ps =~? s:NC.'\<\%(generic\|map\|port\)\>' || ps =~ '^\s*('
|
||||
let ind = t
|
||||
endif
|
||||
@ -236,38 +247,38 @@ function GetVHDLindent()
|
||||
return 0
|
||||
endif
|
||||
|
||||
" indent: follow indent of previous opening statement
|
||||
" indent: maintain indent of previous opening statement
|
||||
" keyword: "is"
|
||||
" where: start of current line
|
||||
" find previous opening statement of
|
||||
" keywords: "architecture", "block", "configuration", "entity", "function", "package", "procedure", "process", "type"
|
||||
if curs =~? '^\s*\<is\>' && prevs =~? s:NC.s:NE.'\<\%(architecture\|block\|configuration\|entity\|function\|package\|procedure\|process\|type\)\>'
|
||||
return indent(prevn)
|
||||
return ind2
|
||||
endif
|
||||
|
||||
" indent: follow indent of previous opening statement
|
||||
" indent: maintain indent of previous opening statement
|
||||
" keyword: "then"
|
||||
" where: start of current line
|
||||
" find previous opening statement of
|
||||
" keywords: "elsif", "if"
|
||||
if curs =~? '^\s*\<then\>' && (prevs =~? s:NC.'\<elsif\>' || prevs =~? s:NC.s:NE.'\<if\>')
|
||||
return indent(prevn)
|
||||
return ind2
|
||||
endif
|
||||
|
||||
" indent: follow indent of previous opening statement
|
||||
" indent: maintain indent of previous opening statement
|
||||
" keyword: "generate"
|
||||
" where: start of current line
|
||||
" find previous opening statement of
|
||||
" keywords: "for", "if"
|
||||
if curs =~? '^\s*\<generate\>' && (prevs =~? s:NC.'\<for\>' || prevs =~? s:NC.s:NE.'\<if\>')
|
||||
return indent(prevn)
|
||||
if curs =~? '^\s*\<generate\>' && (prevs =~? s:NC.s:NE.'\%(\<wait\s\+\)\@<!\<for\>' || prevs =~? s:NC.s:NE.'\<if\>')
|
||||
return ind2
|
||||
endif
|
||||
|
||||
" indent: +sw
|
||||
" keywords: "block", "for", "loop", "process", "record", "units"
|
||||
" keywords: "block", "loop", "process", "record", "units"
|
||||
" removed: "case", "if"
|
||||
" where: anywhere in previous line
|
||||
if prevs =~? s:NC.s:NE.'\<\%(block\|for\|loop\|process\|record\|units\)\>'
|
||||
if prevs =~? s:NC.s:NE.'\<\%(block\|loop\|process\|record\|units\)\>'
|
||||
return ind + &sw
|
||||
endif
|
||||
|
||||
@ -280,10 +291,10 @@ function GetVHDLindent()
|
||||
endif
|
||||
|
||||
" indent: +sw
|
||||
" keywords: "architecture", "component", "configuration", "entity", "package"
|
||||
" removed: "package", "when", "with"
|
||||
" keywords: "architecture", "component", "configuration", "entity", "for", "package"
|
||||
" removed: "when", "with"
|
||||
" where: start of previous line
|
||||
if prevs =~? '^\s*\%(architecture\|component\|configuration\|entity\|package\)\>'
|
||||
if prevs =~? '^\s*\%(architecture\|component\|configuration\|entity\|for\|package\)\>'
|
||||
return ind + &sw
|
||||
endif
|
||||
|
||||
@ -319,33 +330,60 @@ function GetVHDLindent()
|
||||
endif
|
||||
|
||||
" indent: -sw
|
||||
" keywords: "end" + "block", "component", "for", "function", "generate", "if", "loop", "procedure", "process", "record", "units"
|
||||
" keywords: "end" + "block", "for", "function", "generate", "if", "loop", "procedure", "process", "record", "units"
|
||||
" where: start of current line
|
||||
" keyword: ")"
|
||||
" where: start of current line
|
||||
if curs =~? '^\s*end\s\+\%(block\|component\|for\|function\|generate\|if\|loop\|procedure\|process\|record\|units\)\>' || curs =~ '^\s*)'
|
||||
if curs =~? '^\s*end\s\+\%(block\|for\|function\|generate\|if\|loop\|procedure\|process\|record\|units\)\>' || curs =~ '^\s*)'
|
||||
return ind - &sw
|
||||
endif
|
||||
|
||||
" indent: backtrace previous non-comment lines; -sw if begin with "when", follow if begin with "case"
|
||||
" keyword: "end" + "case"
|
||||
" indent: backtrace previous non-comment lines
|
||||
" keyword: "end" + "case", "component"
|
||||
" where: start of current line
|
||||
let m = 0
|
||||
if curs =~? '^\s*end\s\+case\>'
|
||||
let m = 1
|
||||
elseif curs =~? '^\s*end\s\+component\>'
|
||||
let m = 2
|
||||
endif
|
||||
|
||||
if m > 0
|
||||
" find following previous non-comment line
|
||||
let pn = prevn
|
||||
let ps = getline(pn)
|
||||
while pn > 0
|
||||
if ps !~ '^\s*--'
|
||||
if ps =~? '^\s*when\>'
|
||||
return indent(pn) - &sw
|
||||
elseif ps =~? '^\s*case\>'
|
||||
return indent(pn)
|
||||
"indent: -2sw
|
||||
"keywords: "end" + "case"
|
||||
"where: start of previous non-comment line
|
||||
"indent: -sw
|
||||
"keywords: "when"
|
||||
"where: start of previous non-comment line
|
||||
"indent: follow
|
||||
"keywords: "case"
|
||||
"where: start of previous non-comment line
|
||||
if m == 1
|
||||
if ps =~? '^\s*end\s\+case\>'
|
||||
return indent(pn) - 2 * &sw
|
||||
elseif ps =~? '^\s*when\>'
|
||||
return indent(pn) - &sw
|
||||
elseif ps =~? '^\s*case\>'
|
||||
return indent(pn)
|
||||
endif
|
||||
"indent: follow
|
||||
"keyword: "component"
|
||||
"where: anywhere in previous non-comment line
|
||||
elseif m == 2
|
||||
if ps =~? s:NC.s:NE.'\<component\>'
|
||||
return indent(pn)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
let pn = prevnonblank(pn - 1)
|
||||
let ps = getline(pn)
|
||||
endwhile
|
||||
return ind
|
||||
return ind - &sw
|
||||
endif
|
||||
|
||||
" indent: 0
|
||||
@ -363,7 +401,7 @@ function GetVHDLindent()
|
||||
endif
|
||||
|
||||
" ****************************************************************************************
|
||||
" indent: maintain default
|
||||
" indent: maintain indent of previous opening statement
|
||||
" keywords: without "generic", "map", "port" + ":" but not ":=" + "in", "out", "inout", "buffer", "linkage", variable & ":="
|
||||
" where: anywhere in current line
|
||||
if curs =~? s:NC.'\%(\<\%(generic\|map\|port\)\>.*\)\@<!:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)'
|
||||
|
@ -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: 2005 Oct 01
|
||||
" Last Change: 2006 Jan 27
|
||||
|
||||
" 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.
|
||||
@ -1034,7 +1034,7 @@ endif
|
||||
" Select a session to load; default to current session name if present
|
||||
fun! s:LoadVimSesn()
|
||||
if strlen(v:this_session) > 0
|
||||
let name = v:this_session
|
||||
let name = escape(v:this_session, ' \t#%$|<>"*?[{`')
|
||||
else
|
||||
let name = "Session.vim"
|
||||
endif
|
||||
@ -1046,7 +1046,7 @@ fun! s:SaveVimSesn()
|
||||
if strlen(v:this_session) == 0
|
||||
let v:this_session = "Session.vim"
|
||||
endif
|
||||
execute "browse mksession! " . v:this_session
|
||||
execute "browse mksession! " . escape(v:this_session, ' \t#%$|<>"*?[{`')
|
||||
endfun
|
||||
|
||||
endif
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -4,12 +4,11 @@
|
||||
# aap generate all the .spl files
|
||||
# aap diff create all the diff files
|
||||
|
||||
# "hu" is at the end, because it takes a very long time.
|
||||
LANG = af am bg ca cs cy da de el en eo es fr fo ga gd gl he hr id it ku
|
||||
la lt lv mg mi ms nb nl nn ny pl pt ro ru rw sk sl sv sw
|
||||
tet th tl tn uk yi zu hu
|
||||
|
||||
# "hu" is at the end, because it takes a very long time.
|
||||
#
|
||||
# TODO:
|
||||
# Finnish doesn't work, the dictionary fi_FI.zip file contains hyphenation...
|
||||
|
||||
|
11
src/diff.c
11
src/diff.c
@ -1893,6 +1893,7 @@ ex_diffgetput(eap)
|
||||
buf_T *buf;
|
||||
int start_skip, end_skip;
|
||||
int new_count;
|
||||
int buf_empty;
|
||||
|
||||
/* Find the current buffer in the list of diff buffers. */
|
||||
idx_cur = diff_buf_idx(curbuf);
|
||||
@ -2047,9 +2048,12 @@ ex_diffgetput(eap)
|
||||
end_skip = 0;
|
||||
}
|
||||
|
||||
buf_empty = FALSE;
|
||||
added = 0;
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
/* remember deleting the last line of the buffer */
|
||||
buf_empty = curbuf->b_ml.ml_line_count == 1;
|
||||
ml_delete(lnum, FALSE);
|
||||
--added;
|
||||
}
|
||||
@ -2066,6 +2070,13 @@ ex_diffgetput(eap)
|
||||
ml_append(lnum + i - 1, p, 0, FALSE);
|
||||
vim_free(p);
|
||||
++added;
|
||||
if (buf_empty && curbuf->b_ml.ml_line_count == 2)
|
||||
{
|
||||
/* Added the first line into an empty buffer, need to
|
||||
* delete the dummy empty line. */
|
||||
buf_empty = FALSE;
|
||||
ml_delete((linenr_T)2, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
new_count = dp->df_count[idx_to] + added;
|
||||
|
17
src/edit.c
17
src/edit.c
@ -111,8 +111,7 @@ static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int
|
||||
static int ins_compl_make_cyclic __ARGS((void));
|
||||
static void ins_compl_upd_pum __ARGS((void));
|
||||
static void ins_compl_del_pum __ARGS((void));
|
||||
static int pum_wanted __ARGS((void));
|
||||
static void ins_compl_show_pum __ARGS((void));
|
||||
static int pum_wanted __ARGS((void));
|
||||
static void ins_compl_dictionaries __ARGS((char_u *dict, char_u *pat, int dir, int flags, int thesaurus));
|
||||
static void ins_compl_free __ARGS((void));
|
||||
static void ins_compl_clear __ARGS((void));
|
||||
@ -2193,7 +2192,7 @@ pum_wanted()
|
||||
/*
|
||||
* Show the popup menu for the list of matches.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
ins_compl_show_pum()
|
||||
{
|
||||
compl_T *compl;
|
||||
@ -2266,13 +2265,14 @@ ins_compl_show_pum()
|
||||
pum_display(compl_match_array, compl_match_arraysize, cur,
|
||||
curwin->w_cline_row + W_WINROW(curwin),
|
||||
curwin->w_cline_height,
|
||||
curwin->w_wcol + W_WINCOL(curwin));
|
||||
curwin->w_wcol + W_WINCOL(curwin) - curwin->w_leftcol);
|
||||
curwin->w_cursor.col = col;
|
||||
}
|
||||
}
|
||||
|
||||
#define DICT_FIRST (1) /* use just first element in "dict" */
|
||||
#define DICT_EXACT (2) /* "dict" is the exact name of a file */
|
||||
|
||||
/*
|
||||
* Add any identifiers that match the given pattern to the list of
|
||||
* completions.
|
||||
@ -2842,6 +2842,8 @@ expand_by_function(type, base, matches)
|
||||
((char_u **)ga.ga_data)[ga.ga_len] = vim_strsave(p);
|
||||
++ga.ga_len;
|
||||
}
|
||||
else if (did_emsg)
|
||||
break;
|
||||
}
|
||||
|
||||
list_unref(matchlist);
|
||||
@ -3367,9 +3369,6 @@ ins_compl_next(allow_get_expansion, count)
|
||||
/* may undisplay the popup menu first */
|
||||
ins_compl_upd_pum();
|
||||
|
||||
/* Display the current match. */
|
||||
update_screen(0);
|
||||
|
||||
/* display the updated popup menu */
|
||||
ins_compl_show_pum();
|
||||
|
||||
@ -7216,7 +7215,7 @@ ins_bs(c, mode, inserted_space_p)
|
||||
*/
|
||||
if ( mode == BACKSPACE_CHAR
|
||||
&& ((p_sta && in_indent)
|
||||
|| (curbuf->b_p_sts
|
||||
|| (curbuf->b_p_sts != 0
|
||||
&& (*(ml_get_cursor() - 1) == TAB
|
||||
|| (*(ml_get_cursor() - 1) == ' '
|
||||
&& (!*inserted_space_p
|
||||
@ -7228,7 +7227,7 @@ ins_bs(c, mode, inserted_space_p)
|
||||
int extra = 0;
|
||||
|
||||
*inserted_space_p = FALSE;
|
||||
if (p_sta)
|
||||
if (p_sta && in_indent)
|
||||
ts = curbuf->b_p_sw;
|
||||
else
|
||||
ts = curbuf->b_p_sts;
|
||||
|
71
src/eval.c
71
src/eval.c
@ -517,7 +517,6 @@ static void f_getfsize __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_getftime __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_getftype __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_getline __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_getloclist __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_getqflist __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_getreg __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_getregtype __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
@ -6866,7 +6865,7 @@ static struct fst
|
||||
{"getftime", 1, 1, f_getftime},
|
||||
{"getftype", 1, 1, f_getftype},
|
||||
{"getline", 1, 2, f_getline},
|
||||
{"getloclist", 1, 1, f_getloclist},
|
||||
{"getloclist", 1, 1, f_getqflist},
|
||||
{"getqflist", 0, 0, f_getqflist},
|
||||
{"getreg", 0, 2, f_getreg},
|
||||
{"getregtype", 0, 1, f_getregtype},
|
||||
@ -7179,7 +7178,8 @@ get_func_tv(name, len, rettv, arg, firstline, lastline, doesrange,
|
||||
|
||||
/*
|
||||
* Call a function with its resolved parameters
|
||||
* Return OK or FAIL.
|
||||
* Return OK when the function can't be called, FAIL otherwise.
|
||||
* Also returns OK when an error was encountered while executing the function.
|
||||
*/
|
||||
static int
|
||||
call_func(name, len, rettv, argcount, argvars, firstline, lastline,
|
||||
@ -8829,7 +8829,7 @@ filter_map(argvars, rettv, map)
|
||||
int rem;
|
||||
int todo;
|
||||
char_u *msg = map ? (char_u *)"map()" : (char_u *)"filter()";
|
||||
|
||||
int save_called_emsg;
|
||||
|
||||
rettv->vval.v_number = 0;
|
||||
if (argvars[0].v_type == VAR_LIST)
|
||||
@ -8859,6 +8859,12 @@ filter_map(argvars, rettv, map)
|
||||
prepare_vimvar(VV_VAL, &save_val);
|
||||
expr = skipwhite(expr);
|
||||
|
||||
/* We reset "called_emsg" to be able to detect whether an error
|
||||
* occurred during evaluation of the expression. "did_emsg" can't be
|
||||
* used, because it is reset when calling a function. */
|
||||
save_called_emsg = called_emsg;
|
||||
called_emsg = FALSE;
|
||||
|
||||
if (argvars[0].v_type == VAR_DICT)
|
||||
{
|
||||
prepare_vimvar(VV_KEY, &save_key);
|
||||
@ -8876,7 +8882,8 @@ filter_map(argvars, rettv, map)
|
||||
if (tv_check_lock(di->di_tv.v_lock, msg))
|
||||
break;
|
||||
vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
|
||||
if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL)
|
||||
if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
|
||||
|| called_emsg)
|
||||
break;
|
||||
if (!map && rem)
|
||||
dictitem_remove(d, di);
|
||||
@ -8894,7 +8901,8 @@ filter_map(argvars, rettv, map)
|
||||
if (tv_check_lock(li->li_tv.v_lock, msg))
|
||||
break;
|
||||
nli = li->li_next;
|
||||
if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL)
|
||||
if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL
|
||||
|| called_emsg)
|
||||
break;
|
||||
if (!map && rem)
|
||||
listitem_remove(l, li);
|
||||
@ -8902,6 +8910,8 @@ filter_map(argvars, rettv, map)
|
||||
}
|
||||
|
||||
restore_vimvar(VV_VAL, &save_val);
|
||||
|
||||
called_emsg |= save_called_emsg;
|
||||
}
|
||||
|
||||
copy_tv(&argvars[0], rettv);
|
||||
@ -9795,18 +9805,18 @@ f_getline(argvars, rettv)
|
||||
get_buffer_lines(curbuf, lnum, end, retlist, rettv);
|
||||
}
|
||||
|
||||
static void get_qf_ll_ist __ARGS((win_T *wp, typval_T *rettv));
|
||||
|
||||
/*
|
||||
* Shared by getqflist() and getloclist() functions
|
||||
* "getqflist()" and "getloclist()" functions
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
get_qf_ll_ist(wp, rettv)
|
||||
win_T *wp;
|
||||
f_getqflist(argvars, rettv)
|
||||
typval_T *argvars;
|
||||
typval_T *rettv;
|
||||
{
|
||||
#ifdef FEAT_QUICKFIX
|
||||
list_T *l;
|
||||
win_T *wp;
|
||||
#endif
|
||||
|
||||
rettv->vval.v_number = FALSE;
|
||||
@ -9817,40 +9827,17 @@ get_qf_ll_ist(wp, rettv)
|
||||
rettv->vval.v_list = l;
|
||||
rettv->v_type = VAR_LIST;
|
||||
++l->lv_refcount;
|
||||
wp = NULL;
|
||||
if (argvars[0].v_type != VAR_UNKNOWN) /* getloclist() */
|
||||
{
|
||||
wp = find_win_by_nr(&argvars[0]);
|
||||
if (wp == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
(void)get_errorlist(wp, l);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* "getloclist()" function
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
f_getloclist(argvars, rettv)
|
||||
typval_T *argvars;
|
||||
typval_T *rettv;
|
||||
{
|
||||
win_T *win;
|
||||
|
||||
rettv->vval.v_number = FALSE;
|
||||
|
||||
win = find_win_by_nr(&argvars[0]);
|
||||
if (win != NULL)
|
||||
get_qf_ll_ist(win, rettv);
|
||||
}
|
||||
|
||||
/*
|
||||
* "getqflist()" function
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
f_getqflist(argvars, rettv)
|
||||
typval_T *argvars;
|
||||
typval_T *rettv;
|
||||
{
|
||||
get_qf_ll_ist(NULL, rettv);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -5122,10 +5122,7 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
|
||||
for (j = 0; pat[i][j] != NUL; ++j)
|
||||
{
|
||||
if (pat[i][j] == '`')
|
||||
{
|
||||
intick = !intick;
|
||||
*p++ = pat[i][j];
|
||||
}
|
||||
else if (pat[i][j] == '\\' && pat[i][j + 1] != NUL)
|
||||
{
|
||||
/* Remove a backslash, take char literally. But keep
|
||||
@ -5134,19 +5131,16 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
|
||||
if (intick
|
||||
|| vim_strchr(SHELL_SPECIAL, pat[i][j + 1]) != NULL)
|
||||
*p++ = '\\';
|
||||
*p++ = pat[i][++j];
|
||||
++j;
|
||||
}
|
||||
else if (!intick && vim_strchr(SHELL_SPECIAL,
|
||||
pat[i][j]) != NULL)
|
||||
{
|
||||
/* Put a backslash before a special character, but not
|
||||
* when inside ``. */
|
||||
*p++ = '\\';
|
||||
*p++ = pat[i][j];
|
||||
}
|
||||
else
|
||||
/* Simply copy the character. */
|
||||
*p++ = pat[i][++j];
|
||||
|
||||
/* Copy one character. */
|
||||
*p++ = pat[i][j];
|
||||
}
|
||||
*p = NUL;
|
||||
#endif
|
||||
|
@ -9,6 +9,7 @@ void backspace_until_column __ARGS((int col));
|
||||
int vim_is_ctrl_x_key __ARGS((int c));
|
||||
int ins_compl_add_infercase __ARGS((char_u *str, int len, char_u *fname, int dir, int flags));
|
||||
int ins_compl_add __ARGS((char_u *str, int len, char_u *fname, int dir, int flags));
|
||||
void ins_compl_show_pum __ARGS((void));
|
||||
char_u *find_word_start __ARGS((char_u *ptr));
|
||||
char_u *find_word_end __ARGS((char_u *ptr));
|
||||
void ins_compl_check_keys __ARGS((int frequency));
|
||||
|
@ -3318,7 +3318,7 @@ set_errorlist(wp, list, action)
|
||||
|
||||
if (wp != NULL)
|
||||
{
|
||||
qi = ll_get_or_alloc_list(curwin);
|
||||
qi = ll_get_or_alloc_list(wp);
|
||||
if (qi == NULL)
|
||||
return FAIL;
|
||||
}
|
||||
|
@ -521,6 +521,7 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
||||
int match_ok;
|
||||
long nmatched;
|
||||
int submatch = 0;
|
||||
int save_called_emsg = called_emsg;
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
int break_loop = FALSE;
|
||||
#else
|
||||
@ -552,9 +553,9 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
||||
else
|
||||
extra_col = 1;
|
||||
|
||||
/*
|
||||
* find the string
|
||||
*/
|
||||
/*
|
||||
* find the string
|
||||
*/
|
||||
called_emsg = FALSE;
|
||||
do /* loop for count */
|
||||
{
|
||||
@ -865,6 +866,8 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
||||
|
||||
vim_free(regmatch.regprog);
|
||||
|
||||
called_emsg |= save_called_emsg;
|
||||
|
||||
if (!found) /* did not find it */
|
||||
{
|
||||
if (got_int)
|
||||
|
10
src/term.c
10
src/term.c
@ -3140,7 +3140,15 @@ set_shellsize(width, height, mustset)
|
||||
else
|
||||
{
|
||||
update_topline();
|
||||
update_screen(NOT_VALID);
|
||||
#if defined(FEAT_INS_EXPAND)
|
||||
if (pum_visible())
|
||||
{
|
||||
redraw_later(NOT_VALID);
|
||||
ins_compl_show_pum(); /* This includes the redraw. */
|
||||
}
|
||||
else
|
||||
#endif
|
||||
update_screen(NOT_VALID);
|
||||
if (redrawing())
|
||||
setcursor();
|
||||
}
|
||||
|
@ -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 Jan 26)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 26, compiled "
|
||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 29)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 29, compiled "
|
||||
|
Reference in New Issue
Block a user