mirror of
https://github.com/neovim/neovim.git
synced 2026-07-12 04:19:45 +00:00
Merge pull request #13599 from janlazo/vim-8.2.2197
vim-patch:8.1.{1837,1840},8.2.{907,2197,2203}
This commit is contained in:
@@ -623,6 +623,9 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
||||
" Gedcom
|
||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||
|
||||
" Gift (Moodle)
|
||||
autocmd BufRead,BufNewFile *.gift setf gift
|
||||
|
||||
" Git
|
||||
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig
|
||||
|
||||
@@ -4206,6 +4206,8 @@ static void f_has(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
n = true;
|
||||
} else if (STRICMP(name, "syntax_items") == 0) {
|
||||
n = syntax_present(curwin);
|
||||
} else if (STRICMP(name, "clipboard_working") == 0) {
|
||||
n = eval_has_provider("clipboard");
|
||||
#ifdef UNIX
|
||||
} else if (STRICMP(name, "unnamedplus") == 0) {
|
||||
n = eval_has_provider("clipboard");
|
||||
|
||||
@@ -181,6 +181,7 @@ let s:filename_checks = {
|
||||
\ 'gdb': ['.gdbinit'],
|
||||
\ 'gdmo': ['file.mo', 'file.gdmo'],
|
||||
\ 'gedcom': ['file.ged', 'lltxxxxx.txt'],
|
||||
\ 'gift': ['file.gift'],
|
||||
\ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG'],
|
||||
\ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig'],
|
||||
\ 'gitolite': ['gitolite.conf'],
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
source check.vim
|
||||
|
||||
func Test_yank_put_clipboard()
|
||||
new
|
||||
@@ -10,6 +11,16 @@ func Test_yank_put_clipboard()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_global_set_clipboard()
|
||||
CheckFeature clipboard_working
|
||||
new
|
||||
set clipboard=unnamedplus
|
||||
let @+='clipboard' | g/^/set cb= | let @" = 'unnamed' | put
|
||||
call assert_equal(['','unnamed'], getline(1, '$'))
|
||||
set clipboard&
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_nested_global()
|
||||
new
|
||||
call setline(1, ['nothing', 'found', 'found bad', 'bad'])
|
||||
|
||||
@@ -259,9 +259,9 @@ func Test_insert_small_delete()
|
||||
call setline(1, ['foo foobar bar'])
|
||||
call cursor(1,1)
|
||||
exe ":norm! ciw'\<C-R>-'"
|
||||
call assert_equal(getline(1), "'foo' foobar bar")
|
||||
call assert_equal("'foo' foobar bar", getline(1))
|
||||
exe ":norm! w.w."
|
||||
call assert_equal(getline(1), "'foo' 'foobar' 'bar'")
|
||||
call assert_equal("'foo' 'foobar' 'bar'", getline(1))
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user