diff options
-rw-r--r-- | runtime/autoload/health/provider.vim | 16 | ||||
-rw-r--r-- | runtime/autoload/man.vim | 4 | ||||
-rw-r--r-- | test/functional/autocmd/tabclose_spec.lua | 111 | ||||
-rw-r--r-- | third-party/CMakeLists.txt | 20 |
4 files changed, 70 insertions, 81 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 83dee043a0..d1239db605 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -370,21 +370,9 @@ function! s:check_python(version) abort let python_bin = '' endif - - " Check if $VIRTUAL_ENV is active. + " Check if $VIRTUAL_ENV is valid. if exists('$VIRTUAL_ENV') - let virtualenv_inactive = 0 - - if !empty(pyenv) - let pyenv_prefix = resolve(s:trim(s:system([pyenv, 'prefix']))) - if $VIRTUAL_ENV != pyenv_prefix - let virtualenv_inactive = 1 - endif - elseif !empty(pyname) && exepath(pyname) !~# '^'.$VIRTUAL_ENV.'/' - let virtualenv_inactive = 1 - endif - - if virtualenv_inactive + if !empty(pyname) && $VIRTUAL_ENV !=# matchstr(exepath(pyname), '^\V'.$VIRTUAL_ENV) call health#report_warn( \ '$VIRTUAL_ENV exists but appears to be inactive. ' \ . 'This could lead to unexpected results.', diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index dd71ede680..af5c4dbd60 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -65,9 +65,9 @@ function! man#open_page(count, count1, mods, ...) abort try set eventignore+=BufReadCmd if a:mods !~# 'tab' && s:find_man() - execute 'silent edit' fnameescape(bufname) + execute 'silent keepalt edit' fnameescape(bufname) else - execute 'silent' a:mods 'split' fnameescape(bufname) + execute 'silent keepalt' a:mods 'split' fnameescape(bufname) endif finally set eventignore-=BufReadCmd diff --git a/test/functional/autocmd/tabclose_spec.lua b/test/functional/autocmd/tabclose_spec.lua index c412687b8c..fb777e7eea 100644 --- a/test/functional/autocmd/tabclose_spec.lua +++ b/test/functional/autocmd/tabclose_spec.lua @@ -2,66 +2,67 @@ local helpers = require('test.functional.helpers')(after_each) local clear, nvim, eq = helpers.clear, helpers.nvim, helpers.eq describe('TabClosed', function() - before_each(clear) - describe('au TabClosed', function() - describe('with * as <afile>', function() - it('matches when closing any tab', function() - nvim('command', 'au! TabClosed * echom "tabclosed:".expand("<afile>").":".expand("<amatch>").":".tabpagenr()') - repeat - nvim('command', 'tabnew') - until nvim('eval', 'tabpagenr()') == 6 -- current tab is now 6 - eq("\ntabclosed:6:6:5", nvim('command_output', 'tabclose')) -- close last 6, current tab is now 5 - eq("\ntabclosed:5:5:4", nvim('command_output', 'close')) -- close last window on tab, closes tab - eq("\ntabclosed:2:2:3", nvim('command_output', '2tabclose')) -- close tab 2, current tab is now 3 - eq("\ntabclosed:1:1:2\ntabclosed:1:1:1", nvim('command_output', 'tabonly')) -- close tabs 1 and 2 - end) + before_each(clear) - it('is triggered when closing a window via bdelete from another tab', function() - nvim('command', 'au! TabClosed * echom "tabclosed:".expand("<afile>").":".expand("<amatch>").":".tabpagenr()') - nvim('command', '1tabedit Xtestfile') - nvim('command', '1tabedit Xtestfile') - nvim('command', 'normal! 1gt') - eq({1, 3}, nvim('eval', '[tabpagenr(), tabpagenr("$")]')) - eq("\ntabclosed:2:2:1\ntabclosed:2:2:1", nvim('command_output', 'bdelete Xtestfile')) - eq({1, 1}, nvim('eval', '[tabpagenr(), tabpagenr("$")]')) - end) + describe('au TabClosed', function() + describe('with * as <afile>', function() + it('matches when closing any tab', function() + nvim('command', 'au! TabClosed * echom "tabclosed:".expand("<afile>").":".expand("<amatch>").":".tabpagenr()') + repeat + nvim('command', 'tabnew') + until nvim('eval', 'tabpagenr()') == 6 -- current tab is now 6 + eq("\ntabclosed:6:6:5", nvim('command_output', 'tabclose')) -- close last 6, current tab is now 5 + eq("\ntabclosed:5:5:4", nvim('command_output', 'close')) -- close last window on tab, closes tab + eq("\ntabclosed:2:2:3", nvim('command_output', '2tabclose')) -- close tab 2, current tab is now 3 + eq("\ntabclosed:1:1:2\ntabclosed:1:1:1", nvim('command_output', 'tabonly')) -- close tabs 1 and 2 + end) - it('is triggered when closing a window via bdelete from current tab', function() - nvim('command', 'au! TabClosed * echom "tabclosed:".expand("<afile>").":".expand("<amatch>").":".tabpagenr()') - nvim('command', 'file Xtestfile1') - nvim('command', '1tabedit Xtestfile2') - nvim('command', '1tabedit Xtestfile2') + it('is triggered when closing a window via bdelete from another tab', function() + nvim('command', 'au! TabClosed * echom "tabclosed:".expand("<afile>").":".expand("<amatch>").":".tabpagenr()') + nvim('command', '1tabedit Xtestfile') + nvim('command', '1tabedit Xtestfile') + nvim('command', 'normal! 1gt') + eq({1, 3}, nvim('eval', '[tabpagenr(), tabpagenr("$")]')) + eq("\ntabclosed:2:2:1\ntabclosed:2:2:1", nvim('command_output', 'bdelete Xtestfile')) + eq({1, 1}, nvim('eval', '[tabpagenr(), tabpagenr("$")]')) + end) - -- Only one tab is closed, and the alternate file is used for the other. - eq({2, 3}, nvim('eval', '[tabpagenr(), tabpagenr("$")]')) - eq("\ntabclosed:2:2:2", nvim('command_output', 'bdelete Xtestfile2')) - eq('Xtestfile1', nvim('eval', 'bufname("")')) - end) - end) + it('is triggered when closing a window via bdelete from current tab', function() + nvim('command', 'au! TabClosed * echom "tabclosed:".expand("<afile>").":".expand("<amatch>").":".tabpagenr()') + nvim('command', 'file Xtestfile1') + nvim('command', '1tabedit Xtestfile2') + nvim('command', '1tabedit Xtestfile2') - describe('with NR as <afile>', function() - it('matches when closing a tab whose index is NR', function() - nvim('command', 'au! TabClosed * echom "tabclosed:".expand("<afile>").":".expand("<amatch>").":".tabpagenr()') - nvim('command', 'au! TabClosed 2 echom "tabclosed:match"') - repeat - nvim('command', 'tabnew') - until nvim('eval', 'tabpagenr()') == 7 -- current tab is now 7 - -- sanity check, we shouldn't match on tabs with numbers other than 2 - eq("\ntabclosed:7:7:6", nvim('command_output', 'tabclose')) - -- close tab page 2, current tab is now 5 - eq("\ntabclosed:2:2:5\ntabclosed:match", nvim('command_output', '2tabclose')) - end) - end) + -- Only one tab is closed, and the alternate file is used for the other. + eq({2, 3}, nvim('eval', '[tabpagenr(), tabpagenr("$")]')) + eq("\ntabclosed:2:2:2", nvim('command_output', 'bdelete Xtestfile2')) + eq('Xtestfile1', nvim('eval', 'bufname("")')) + end) + end) + + describe('with NR as <afile>', function() + it('matches when closing a tab whose index is NR', function() + nvim('command', 'au! TabClosed * echom "tabclosed:".expand("<afile>").":".expand("<amatch>").":".tabpagenr()') + nvim('command', 'au! TabClosed 2 echom "tabclosed:match"') + repeat + nvim('command', 'tabnew') + until nvim('eval', 'tabpagenr()') == 7 -- current tab is now 7 + -- sanity check, we shouldn't match on tabs with numbers other than 2 + eq("\ntabclosed:7:7:6", nvim('command_output', 'tabclose')) + -- close tab page 2, current tab is now 5 + eq("\ntabclosed:2:2:5\ntabclosed:match", nvim('command_output', '2tabclose')) + end) + end) - describe('with close', function() - it('is triggered', function() - nvim('command', 'au! TabClosed * echom "tabclosed:".expand("<afile>").":".expand("<amatch>").":".tabpagenr()') - nvim('command', 'tabedit Xtestfile') - eq({2, 2}, nvim('eval', '[tabpagenr(), tabpagenr("$")]')) - eq("\ntabclosed:2:2:1", nvim('command_output', 'close')) - eq({1, 1}, nvim('eval', '[tabpagenr(), tabpagenr("$")]')) - end) - end) + describe('with close', function() + it('is triggered', function() + nvim('command', 'au! TabClosed * echom "tabclosed:".expand("<afile>").":".expand("<amatch>").":".tabpagenr()') + nvim('command', 'tabedit Xtestfile') + eq({2, 2}, nvim('eval', '[tabpagenr(), tabpagenr("$")]')) + eq("\ntabclosed:2:2:1", nvim('command_output', 'close')) + eq({1, 1}, nvim('eval', '[tabpagenr(), tabpagenr("$")]')) + end) end) + end) end) diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index 66f921ffcc..9bfcee4ed4 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -90,18 +90,18 @@ include(ExternalProject) set(LIBUV_URL https://github.com/libuv/libuv/archive/v1.12.0.tar.gz) set(LIBUV_SHA256 41ce914a88da21d3b07a76023beca57576ca5b376c6ac440c80bc581cbca1250) -set(MSGPACK_URL https://github.com/msgpack/msgpack-c/archive/cpp-2.1.3.tar.gz) -set(MSGPACK_SHA256 42ff5c213fd24bd4388c45c1f21d84b476678ce6366ea4d4f4086618a1d2cd23) +set(MSGPACK_URL https://github.com/msgpack/msgpack-c/releases/download/cpp-2.1.5/msgpack-2.1.5.tar.gz) +set(MSGPACK_SHA256 6126375af9b204611b9d9f154929f4f747e4599e6ae8443b337915dcf2899d2b) -set(LUAJIT_URL https://github.com/LuaJIT/LuaJIT/archive/82151a4514e6538086f3f5e01cb8d4b22287b14f.tar.gz) -set(LUAJIT_SHA256 8bc4e96ebab74e12ab84e751360e864714289bb089b51b6f396fa9a97df69798) +set(LUAJIT_URL https://github.com/LuaJIT/LuaJIT/archive/7dbf0b05f1228c1c719866db5e5f3d58f87f74c8.tar.gz) +set(LUAJIT_SHA256 cbae019b5e396164eb5f0d07777b55cc03931bb944f83c61a010c053c9f5fd5b) set(LUA_URL https://www.lua.org/ftp/lua-5.1.5.tar.gz) set(LUA_SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333) # NOTE: Version must match LUAROCKS_VERSION in third-party/cmake/BuildLuarocks.cmake -set(LUAROCKS_URL https://github.com/luarocks/luarocks/archive/v2.4.2.tar.gz) -set(LUAROCKS_SHA256 eef88c2429c715a7beb921e4b1ba571dddb7c74a250fbb0d3cc0d4be7a5865d9) +set(LUAROCKS_URL https://github.com/luarocks/luarocks/archive/v2.4.3.tar.gz) +set(LUAROCKS_SHA256 ea1881d6954f2a98c34f93674571c8f0cbdbc28dedb3fa3cb56b6a91886d1a99) set(UNIBILIUM_URL https://github.com/mauke/unibilium/archive/v1.2.1.tar.gz) set(UNIBILIUM_SHA256 6045b4f6adca7b1123284007675ca71f718f70942d3a93d8b9fa5bd442006ec1) @@ -117,8 +117,8 @@ endif() set(LIBVTERM_URL https://github.com/neovim/libvterm/archive/a9c7c6fd20fa35e0ad3e0e98901ca12dfca9c25c.tar.gz) set(LIBVTERM_SHA256 1a4272be91d9614dc183a503786df83b6584e4afaab7feaaa5409f841afbd796) -set(JEMALLOC_URL https://github.com/jemalloc/jemalloc/releases/download/4.5.0/jemalloc-4.5.0.tar.bz2) -set(JEMALLOC_SHA256 9409d85664b4f135b77518b0b118c549009dc10f6cba14557d170476611f6780) +set(JEMALLOC_URL https://github.com/jemalloc/jemalloc/releases/download/5.0.1/jemalloc-5.0.1.tar.bz2) +set(JEMALLOC_SHA256 4814781d395b0ef093b21a08e8e6e0bd3dab8762f9935bbfb71679b0dea7c3e9) set(LUV_URL https://github.com/luvit/luv/archive/1.9.1-1.tar.gz) set(LUV_SHA256 562b9efaad30aa051a40eac9ade0c3df48bb8186763769abe47ec3fb3edb1268) @@ -139,8 +139,8 @@ set(WIN32YANK_X86_SHA256 62f34e5a46c5d4a7b3f3b512e1ff7b77fedd432f42581cbe825233a set(WIN32YANK_X86_64_URL https://github.com/equalsraf/win32yank/releases/download/v0.0.4/win32yank-x64.zip) set(WIN32YANK_X86_64_SHA256 33a747a92da60fb65e668edbf7661d3d902411a2d545fe9dc08623cecd142a20) -set(WINPTY_URL https://github.com/rprichard/winpty/releases/download/0.4.2/winpty-0.4.2-msvc2015.zip) -set(WINPTY_SHA256 b465f2584ff394b3fe27c01aa1dcfc679583c1ee951d0e83de3f859d8b8305b8) +set(WINPTY_URL https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip) +set(WINPTY_SHA256 35a48ece2ff4acdcbc8299d4920de53eb86b1fb41e64d2fe5ae7898931bcee89) if(USE_BUNDLED_UNIBILIUM) include(BuildUnibilium) |