0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.0176

This commit is contained in:
Bram Moolenaar 2005-12-23 22:13:51 +00:00
parent 5c2f050d91
commit 8fa0445c4f
4 changed files with 51 additions and 33 deletions

View File

@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.0aa. Last change: 2005 Nov 21 *cmdline.txt* For Vim version 7.0aa. Last change: 2005 Dec 23
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -692,6 +692,12 @@ output.
============================================================================== ==============================================================================
6. Ex special characters *cmdline-special* 6. Ex special characters *cmdline-special*
Note: These are special characters in the executed command line. If you want
to insert special things while typing you can use the CTRL-R command. For
example, "%" stands for the current file name, while CTRL-R % inserts the
current file name right away. See |c_CTRL-R|.
In Ex commands, at places where a file name can be used, the following In Ex commands, at places where a file name can be used, the following
characters have a special meaning. These can also be used in the expression characters have a special meaning. These can also be used in the expression
function expand() |expand()|. function expand() |expand()|.

View File

@ -4201,6 +4201,9 @@ restore_backup:
# endif # endif
buf_setino(buf); buf_setino(buf);
} }
else if (buf->b_dev < 0)
/* Set the inode when creating a new file. */
buf_setino(buf);
#endif #endif
if (close(fd) != 0) if (close(fd) != 0)

View File

@ -13,52 +13,46 @@ endfunction
augroup myagroup augroup myagroup
autocmd! BufEnter *.my echo 'myfile edited' autocmd! BufEnter *.my echo 'myfile edited'
augroup END augroup END
redir! > test.out
let test_cases = []
" valid autocmd group " valid autocmd group
call RunTest('#myagroup', 1) let test_cases += [['#myagroup', 1]]
" Valid autocmd group and event " Valid autocmd group and event
call RunTest('#myagroup#BufEnter', 1) let test_cases += [['#myagroup#BufEnter', 1]]
" Valid autocmd group, event and pattern " Valid autocmd group, event and pattern
call RunTest('#myagroup#BufEnter#*.my', 1) let test_cases += [['#myagroup#BufEnter#*.my', 1]]
" Valid autocmd event " Valid autocmd event
call RunTest('#BufEnter', 1) let test_cases += [['#BufEnter', 1]]
" Valid autocmd event and pattern " Valid autocmd event and pattern
call RunTest('#BufEnter#*.my', 1) let test_cases += [['#BufEnter#*.my', 1]]
" Non-existing autocmd group or event " Non-existing autocmd group or event
call RunTest('#xyzagroup', 0) let test_cases += [['#xyzagroup', 0]]
" Non-existing autocmd group and valid autocmd event " Non-existing autocmd group and valid autocmd event
call RunTest('#xyzagroup#BufEnter', 0) let test_cases += [['#xyzagroup#BufEnter', 0]]
" Valid autocmd group and event with no matching pattern
" Valid autocmd group and autocmd event with no matching pattern let test_cases += [['#myagroup#CmdwinEnter', 0]]
call RunTest('#myagroup#CmdwinEnter', 0)
" Valid autocmd group and non-existing autocmd event " Valid autocmd group and non-existing autocmd event
call RunTest('#myagroup#xyzacmd', 0) let test_cases += [['#myagroup#xyzacmd', 0]]
" Valid autocmd group and event and non-matching pattern " Valid autocmd group and event and non-matching pattern
call RunTest('#myagroup#BufEnter#xyzpat', 0) let test_cases += [['#myagroup#BufEnter#xyzpat', 0]]
" Valid autocmd event and non-matching pattern " Valid autocmd event and non-matching pattern
call RunTest('#BufEnter#xyzpat', 0) let test_cases += [['#BufEnter#xyzpat', 0]]
" Empty autocmd group, event and pattern " Empty autocmd group, event and pattern
call RunTest('###', 0) let test_cases += [['###', 0]]
" Empty autocmd group and event or empty event and pattern
let test_cases += [['##', 0]]
" Valid autocmd event
let test_cases += [['##FileReadCmd', 1]]
" Non-existing autocmd event
let test_cases += [['##MySpecialCmd', 0]]
" Empty autocmd group and event or event and pattern redir! > test.out
call RunTest('##', 0)
" Testing support for event name that exists. for [test_case, result] in test_cases
call RunTest('##SwapExists', 1) echo test_case . ": " . result
call RunTest(test_case, result)
" Testing support for event name that doesn't exist. endfor
call RunTest('##SwapNotExists', 0)
redir END redir END
endfunction endfunction

View File

@ -1,16 +1,31 @@
#myagroup: 1
OK OK
#myagroup#BufEnter: 1
OK OK
#myagroup#BufEnter#*.my: 1
OK OK
#BufEnter: 1
OK OK
#BufEnter#*.my: 1
OK OK
#xyzagroup: 0
OK OK
#xyzagroup#BufEnter: 0
OK OK
#myagroup#CmdwinEnter: 0
OK OK
#myagroup#xyzacmd: 0
OK OK
#myagroup#BufEnter#xyzpat: 0
OK OK
#BufEnter#xyzpat: 0
OK OK
###: 0
OK OK
##: 0
OK OK
##FileReadCmd: 1
OK OK
##MySpecialCmd: 0
OK OK