diff options
author | Matthieu Coudron <teto@users.noreply.github.com> | 2020-12-24 17:03:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-24 17:03:37 +0100 |
commit | 6c28bddfad73c527da5e5629919d617dffdea229 (patch) | |
tree | d6a3c37875b1b1f4b1f281ac7c8ccbf4cd8d4ea4 /src | |
parent | 4dfc5bb2d0464c5775ea9f1b0240bf7a8f53b709 (diff) | |
parent | c56377bac65ef9cdc1562c78a5ac51b0916a3ad4 (diff) | |
download | rneovim-6c28bddfad73c527da5e5629919d617dffdea229.tar.gz rneovim-6c28bddfad73c527da5e5629919d617dffdea229.tar.bz2 rneovim-6c28bddfad73c527da5e5629919d617dffdea229.zip |
Merge pull request #13599 from janlazo/vim-8.2.2197
vim-patch:8.1.{1837,1840},8.2.{907,2197,2203}
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval/funcs.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_global.vim | 11 | ||||
-rw-r--r-- | src/nvim/testdir/test_registers.vim | 4 |
4 files changed, 16 insertions, 2 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 89d9a85775..ed01e8a8b0 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -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"); diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 356a7ce135..2123780f11 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -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'], diff --git a/src/nvim/testdir/test_global.vim b/src/nvim/testdir/test_global.vim index bdeaf8e2cf..7ccf2812ff 100644 --- a/src/nvim/testdir/test_global.vim +++ b/src/nvim/testdir/test_global.vim @@ -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']) diff --git a/src/nvim/testdir/test_registers.vim b/src/nvim/testdir/test_registers.vim index 24e02cb385..2f72b6a4c0 100644 --- a/src/nvim/testdir/test_registers.vim +++ b/src/nvim/testdir/test_registers.vim @@ -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 |