mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
Merge branch 'master' into colored-cmdline
This commit is contained in:
@@ -19551,18 +19551,22 @@ static const char *find_option_end(const char **const arg, int *const opt_flags)
|
||||
} else if (*p == 'l' && p[1] == ':') {
|
||||
*opt_flags = OPT_LOCAL;
|
||||
p += 2;
|
||||
} else
|
||||
} else {
|
||||
*opt_flags = 0;
|
||||
}
|
||||
|
||||
if (!ASCII_ISALPHA(*p))
|
||||
if (!ASCII_ISALPHA(*p)) {
|
||||
return NULL;
|
||||
}
|
||||
*arg = p;
|
||||
|
||||
if (p[0] == 't' && p[1] == '_' && p[2] != NUL && p[3] != NUL)
|
||||
p += 4; /* termcap option */
|
||||
else
|
||||
while (ASCII_ISALPHA(*p))
|
||||
++p;
|
||||
if (p[0] == 't' && p[1] == '_' && p[2] != NUL && p[3] != NUL) {
|
||||
p += 4; // t_xx/termcap option
|
||||
} else {
|
||||
while (ASCII_ISALPHA(*p)) {
|
||||
p++;
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@@ -1185,10 +1185,6 @@ do_set (
|
||||
showoptions(1, opt_flags);
|
||||
did_show = TRUE;
|
||||
}
|
||||
} else if (STRNCMP(arg, "termcap",
|
||||
7) == 0 && !(opt_flags & OPT_MODELINE)) {
|
||||
did_show = TRUE;
|
||||
arg += 7;
|
||||
} else {
|
||||
prefix = 1;
|
||||
if (STRNCMP(arg, "no", 2) == 0) {
|
||||
@@ -6070,8 +6066,8 @@ int ExpandSettings(expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***
|
||||
int count = 0;
|
||||
char_u *str;
|
||||
int loop;
|
||||
static char *(names[]) = {"all", "termcap"};
|
||||
int ic = regmatch->rm_ic; /* remember the ignore-case flag */
|
||||
static char *(names[]) = { "all" };
|
||||
int ic = regmatch->rm_ic; // remember the ignore-case flag
|
||||
|
||||
/* do this loop twice:
|
||||
* loop == 0: count the number of matching options
|
||||
|
@@ -132,7 +132,7 @@ $(SCRIPTS) $(SCRIPTS_GUI): $(NVIM_PRG) test1.out
|
||||
|
||||
RM_ON_RUN := test.out X* viminfo
|
||||
RM_ON_START := test.ok
|
||||
RUN_VIM := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(NVIM_PRG) -u unix.vim -U NONE -i viminfo --noplugin -s dotest.in
|
||||
RUN_VIM := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(NVIM_PRG) -u unix.vim -U NONE -i viminfo --headless --noplugin -s dotest.in
|
||||
|
||||
clean:
|
||||
-rm -rf *.out \
|
||||
@@ -201,7 +201,7 @@ nolog:
|
||||
# New style of tests uses Vim script with assert calls. These are easier
|
||||
# to write and a lot easier to read and debug.
|
||||
# Limitation: Only works with the +eval feature.
|
||||
RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(NVIM_PRG) -u unix.vim -U NONE --noplugin
|
||||
RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(NVIM_PRG) -u unix.vim -U NONE --headless --noplugin
|
||||
|
||||
newtests: newtestssilent
|
||||
@/bin/sh -c "if test -f messages && grep -q 'FAILED' messages; then \
|
||||
|
@@ -342,7 +342,10 @@ func Test_BufEnter()
|
||||
call mkdir('Xdir')
|
||||
split Xdir
|
||||
call assert_equal('+++', g:val)
|
||||
bwipe!
|
||||
|
||||
" On MS-Windows we can't edit the directory, make sure we wipe the right
|
||||
" buffer.
|
||||
bwipe! Xdir
|
||||
|
||||
call delete('Xdir', 'd')
|
||||
au! BufEnter
|
||||
@@ -351,40 +354,37 @@ endfunc
|
||||
" Closing a window might cause an endless loop
|
||||
" E814 for older Vims
|
||||
function Test_autocmd_bufwipe_in_SessLoadPost()
|
||||
if has('win32')
|
||||
throw 'Skipped: test hangs on MS-Windows'
|
||||
endif
|
||||
tabnew
|
||||
set noswapfile
|
||||
let g:bufnr=bufnr('%')
|
||||
mksession!
|
||||
|
||||
let content=['set nocp noswapfile',
|
||||
let content = ['set nocp noswapfile',
|
||||
\ 'let v:swapchoice="e"',
|
||||
\ 'augroup test_autocmd_sessionload',
|
||||
\ 'autocmd!',
|
||||
\ 'autocmd SessionLoadPost * 4bw!|qall!',
|
||||
\ 'autocmd SessionLoadPost * 4bw!',
|
||||
\ 'augroup END',
|
||||
\ '',
|
||||
\ 'func WriteErrors()',
|
||||
\ ' call writefile([execute("messages")], "Xerrors")',
|
||||
\ 'endfunc',
|
||||
\ 'au VimLeave * call WriteErrors()',
|
||||
\ ]
|
||||
call writefile(content, 'Xvimrc')
|
||||
let a=system(v:progpath. ' --headless -i NONE -u Xvimrc --noplugins -S Session.vim')
|
||||
call assert_match('E814', a)
|
||||
call system(v:progpath. ' --headless -i NONE -u Xvimrc --noplugins -S Session.vim -c cq')
|
||||
let errors = join(readfile('Xerrors'))
|
||||
call assert_match('E814', errors)
|
||||
|
||||
unlet! g:bufnr
|
||||
set swapfile
|
||||
for file in ['Session.vim', 'Xvimrc']
|
||||
for file in ['Session.vim', 'Xvimrc', 'Xerrors']
|
||||
call delete(file)
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
" SEGV occurs in older versions.
|
||||
function Test_autocmd_bufwipe_in_SessLoadPost2()
|
||||
if has('win32')
|
||||
throw 'Skipped: test hangs on MS-Windows'
|
||||
endif
|
||||
tabnew
|
||||
set noswapfile
|
||||
let g:bufnr=bufnr('%')
|
||||
mksession!
|
||||
|
||||
let content = ['set nocp noswapfile',
|
||||
@@ -399,22 +399,24 @@ function Test_autocmd_bufwipe_in_SessLoadPost2()
|
||||
\ ' exec ''bwipeout '' . b',
|
||||
\ ' endif',
|
||||
\ ' endfor',
|
||||
\ 'redraw!',
|
||||
\ 'echon "SessionLoadPost DONE"',
|
||||
\ 'qall!',
|
||||
\ ' echomsg "SessionLoadPost DONE"',
|
||||
\ 'endfunction',
|
||||
\ 'au SessionLoadPost * call DeleteInactiveBufs()']
|
||||
\ 'au SessionLoadPost * call DeleteInactiveBufs()',
|
||||
\ '',
|
||||
\ 'func WriteErrors()',
|
||||
\ ' call writefile([execute("messages")], "Xerrors")',
|
||||
\ 'endfunc',
|
||||
\ 'au VimLeave * call WriteErrors()',
|
||||
\ ]
|
||||
call writefile(content, 'Xvimrc')
|
||||
let a=system(v:progpath. ' --headless -i NONE -u Xvimrc --noplugins -S Session.vim')
|
||||
" this probably only matches on unix
|
||||
if has("unix")
|
||||
call assert_notmatch('Caught deadly signal SEGV', a)
|
||||
endif
|
||||
call assert_match('SessionLoadPost DONE', a)
|
||||
call system(v:progpath. ' --headless -i NONE -u Xvimrc --noplugins -S Session.vim -c cq')
|
||||
let errors = join(readfile('Xerrors'))
|
||||
" This probably only ever matches on unix.
|
||||
call assert_notmatch('Caught deadly signal SEGV', errors)
|
||||
call assert_match('SessionLoadPost DONE', errors)
|
||||
|
||||
unlet! g:bufnr
|
||||
set swapfile
|
||||
for file in ['Session.vim', 'Xvimrc']
|
||||
for file in ['Session.vim', 'Xvimrc', 'Xerrors']
|
||||
call delete(file)
|
||||
endfor
|
||||
endfunc
|
||||
|
@@ -231,7 +231,7 @@ static const int included_patches[] = {
|
||||
// 501,
|
||||
// 500,
|
||||
499,
|
||||
// 498,
|
||||
498,
|
||||
// 497,
|
||||
// 496,
|
||||
// 495,
|
||||
|
Reference in New Issue
Block a user