Merge #11637 from janlazo/vim-8.1.1739
vim-patch:8.1.{1739,1741},8.2.0063
This commit is contained in:
commit
e922576bdd
|
@ -22,6 +22,8 @@ echo "Install neovim RubyGem."
|
|||
gem install --no-document --version ">= 0.8.0" neovim
|
||||
|
||||
echo "Install neovim npm package"
|
||||
source ~/.nvm/nvm.sh
|
||||
nvm use 10
|
||||
npm install -g neovim
|
||||
npm link neovim
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ exit_suite --continue
|
|||
|
||||
enter_suite tests
|
||||
|
||||
source ~/.nvm/nvm.sh
|
||||
nvm use 10
|
||||
export TREE_SITTER_DIR=$HOME/tree-sitter-build/
|
||||
|
||||
if test "$CLANG_SANITIZER" != "TSAN" ; then
|
||||
|
|
|
@ -5654,7 +5654,8 @@ void cursor_pos_info(dict_T *dict)
|
|||
|
||||
bom_count = bomb_size();
|
||||
if (dict == NULL && bom_count > 0) {
|
||||
vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE - STRLEN(IObuff),
|
||||
const size_t len = STRLEN(IObuff);
|
||||
vim_snprintf((char *)IObuff + len, IOSIZE - len,
|
||||
_("(+%" PRId64 " for BOM)"), (int64_t)bom_count);
|
||||
}
|
||||
if (dict == NULL) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
" Test for :match, :2match, :3match, clearmatches(), getmatches(), matchadd(),
|
||||
" matchaddpos(), matcharg(), matchdelete(), and setmatches().
|
||||
|
||||
source screendump.vim
|
||||
|
||||
function Test_match()
|
||||
highlight MyGroup1 term=bold ctermbg=red guibg=red
|
||||
highlight MyGroup2 term=italic ctermbg=green guibg=green
|
||||
|
@ -248,4 +250,55 @@ func Test_matchaddpos_using_negative_priority()
|
|||
set hlsearch&
|
||||
endfunc
|
||||
|
||||
func OtherWindowCommon()
|
||||
let lines =<< trim END
|
||||
call setline(1, 'Hello Vim world')
|
||||
let mid = matchadd('Error', 'world', 1)
|
||||
let winid = win_getid()
|
||||
new
|
||||
END
|
||||
call writefile(lines, 'XscriptMatchCommon')
|
||||
let buf = RunVimInTerminal('-S XscriptMatchCommon', #{rows: 12})
|
||||
call term_wait(buf)
|
||||
return buf
|
||||
endfunc
|
||||
|
||||
func Test_matchdelete_other_window()
|
||||
if !CanRunVimInTerminal()
|
||||
throw 'Skipped: cannot make screendumps'
|
||||
endif
|
||||
let buf = OtherWindowCommon()
|
||||
call term_sendkeys(buf, ":call matchdelete(mid, winid)\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_matchdelete_1', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('XscriptMatchCommon')
|
||||
endfunc
|
||||
|
||||
func Test_matchclear_other_window()
|
||||
if !CanRunVimInTerminal()
|
||||
throw 'Skipped: cannot make screendumps'
|
||||
endif
|
||||
let buf = OtherWindowCommon()
|
||||
call term_sendkeys(buf, ":call clearmatches(winid)\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_matchclear_1', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('XscriptMatchCommon')
|
||||
endfunc
|
||||
|
||||
func Test_matchadd_other_window()
|
||||
if !CanRunVimInTerminal()
|
||||
throw 'Skipped: cannot make screendumps'
|
||||
endif
|
||||
let buf = OtherWindowCommon()
|
||||
call term_sendkeys(buf, ":call matchadd('Search', 'Hello', 1, -1, #{window: winid})\<CR>")
|
||||
call term_sendkeys(buf, ":\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_matchadd_1', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('XscriptMatchCommon')
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
|
|
@ -6622,7 +6622,7 @@ int match_add(win_T *wp, const char *const grp, const char *const pat,
|
|||
prev->next = m;
|
||||
m->next = cur;
|
||||
|
||||
redraw_later(rtype);
|
||||
redraw_win_later(wp, rtype);
|
||||
return id;
|
||||
|
||||
fail:
|
||||
|
@ -6680,7 +6680,7 @@ int match_delete(win_T *wp, int id, int perr)
|
|||
rtype = VALID;
|
||||
}
|
||||
xfree(cur);
|
||||
redraw_later(rtype);
|
||||
redraw_win_later(wp, rtype);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -6698,7 +6698,7 @@ void clear_matches(win_T *wp)
|
|||
xfree(wp->w_match_head);
|
||||
wp->w_match_head = m;
|
||||
}
|
||||
redraw_later(SOME_VALID);
|
||||
redraw_win_later(wp, SOME_VALID);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue