mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
Merge #9197
This commit is contained in:
@@ -368,7 +368,7 @@ include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
|
|||||||
option(PREFER_LUA "Prefer Lua over LuaJIT in the nvim executable." OFF)
|
option(PREFER_LUA "Prefer Lua over LuaJIT in the nvim executable." OFF)
|
||||||
|
|
||||||
if(PREFER_LUA)
|
if(PREFER_LUA)
|
||||||
find_package(Lua REQUIRED)
|
find_package(Lua 5.1 EXACT REQUIRED)
|
||||||
set(LUA_PREFERRED_INCLUDE_DIRS ${LUA_INCLUDE_DIR})
|
set(LUA_PREFERRED_INCLUDE_DIRS ${LUA_INCLUDE_DIR})
|
||||||
set(LUA_PREFERRED_LIBRARIES ${LUA_LIBRARIES})
|
set(LUA_PREFERRED_LIBRARIES ${LUA_LIBRARIES})
|
||||||
# Passive (not REQUIRED): if LUAJIT_FOUND is not set, nvim-test is skipped.
|
# Passive (not REQUIRED): if LUAJIT_FOUND is not set, nvim-test is skipped.
|
||||||
@@ -414,7 +414,7 @@ if(FEAT_TUI)
|
|||||||
add_definitions(-DNVIM_UNIBI_HAS_VAR_FROM)
|
add_definitions(-DNVIM_UNIBI_HAS_VAR_FROM)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(LibTermkey REQUIRED)
|
find_package(LibTermkey 0.18 REQUIRED)
|
||||||
include_directories(SYSTEM ${LIBTERMKEY_INCLUDE_DIRS})
|
include_directories(SYSTEM ${LIBTERMKEY_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -422,7 +422,7 @@ find_package(LibVterm REQUIRED)
|
|||||||
include_directories(SYSTEM ${LIBVTERM_INCLUDE_DIRS})
|
include_directories(SYSTEM ${LIBVTERM_INCLUDE_DIRS})
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
find_package(Winpty REQUIRED)
|
find_package(Winpty 0.4.3 REQUIRED)
|
||||||
include_directories(SYSTEM ${WINPTY_INCLUDE_DIRS})
|
include_directories(SYSTEM ${WINPTY_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -59,7 +59,10 @@ To list all targets:
|
|||||||
|
|
||||||
cmake --build build --target help
|
cmake --build build --target help
|
||||||
|
|
||||||
To skip "bundled" (`third-party/*`) dependencies, define `USE_BUNDLED=NO`.
|
To skip "bundled" dependencies (`third-party/*`) define `USE_BUNDLED=NO`:
|
||||||
|
|
||||||
|
sudo apt install gperf libluajit-5.1-dev libunibilium-dev libmsgpack-dev libtermkey-dev libvterm-dev libjemalloc-dev
|
||||||
|
make USE_BUNDLED=NO
|
||||||
|
|
||||||
See the [Building Neovim](https://github.com/neovim/neovim/wiki/Building-Neovim) wiki page for details.
|
See the [Building Neovim](https://github.com/neovim/neovim/wiki/Building-Neovim) wiki page for details.
|
||||||
|
|
||||||
|
@@ -50,6 +50,9 @@ if ($compiler -eq 'MINGW') {
|
|||||||
# Add MinGW to the PATH
|
# Add MinGW to the PATH
|
||||||
$env:PATH = "C:\msys64\mingw$bits\bin;$env:PATH"
|
$env:PATH = "C:\msys64\mingw$bits\bin;$env:PATH"
|
||||||
|
|
||||||
|
# Avoid pacman "warning" which causes non-zero return code. https://github.com/open62541/open62541/issues/2068
|
||||||
|
& C:\msys64\usr\bin\mkdir -p /var/cache/pacman/pkg
|
||||||
|
|
||||||
# Build third-party dependencies
|
# Build third-party dependencies
|
||||||
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" ; exitIfFailed
|
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" ; exitIfFailed
|
||||||
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S $mingwPackages" ; exitIfFailed
|
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S $mingwPackages" ; exitIfFailed
|
||||||
|
@@ -44,7 +44,7 @@ func Test_repeat_many()
|
|||||||
let timer = timer_start(50, 'MyHandler', {'repeat': -1})
|
let timer = timer_start(50, 'MyHandler', {'repeat': -1})
|
||||||
sleep 200m
|
sleep 200m
|
||||||
call timer_stop(timer)
|
call timer_stop(timer)
|
||||||
call assert_inrange(2, 4, g:val)
|
call assert_inrange((has('mac') ? 1 : 2), 4, g:val)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_with_partial_callback()
|
func Test_with_partial_callback()
|
||||||
@@ -167,6 +167,9 @@ func Test_stop_all_in_callback()
|
|||||||
let g:timer1 = timer_start(10, 'StopTimerAll')
|
let g:timer1 = timer_start(10, 'StopTimerAll')
|
||||||
let info = timer_info()
|
let info = timer_info()
|
||||||
call assert_equal(1, len(info))
|
call assert_equal(1, len(info))
|
||||||
|
if has('mac')
|
||||||
|
sleep 100m
|
||||||
|
endif
|
||||||
sleep 40m
|
sleep 40m
|
||||||
let info = timer_info()
|
let info = timer_info()
|
||||||
call assert_equal(0, len(info))
|
call assert_equal(0, len(info))
|
||||||
|
@@ -82,7 +82,7 @@ describe('timers', function()
|
|||||||
run(nil, nil, nil, 300)
|
run(nil, nil, nil, 300)
|
||||||
feed("c")
|
feed("c")
|
||||||
local count = eval("g:val")
|
local count = eval("g:val")
|
||||||
assert(count >= 4, 'expected count >= 4, got: '..tostring(count))
|
assert(count >= 3, 'expected count >= 3, got: '..tostring(count))
|
||||||
eq(99, eval("g:c"))
|
eq(99, eval("g:c"))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -144,8 +144,8 @@ describe('timers', function()
|
|||||||
local count2 = eval("g:val")
|
local count2 = eval("g:val")
|
||||||
-- when count is eval:ed after timer_stop this should be non-racy
|
-- when count is eval:ed after timer_stop this should be non-racy
|
||||||
eq(count, count2)
|
eq(count, count2)
|
||||||
assert(4 <= count and count <= 7,
|
assert(3 <= count and count <= 7,
|
||||||
'expected (4 <= count <= 7), got: '..tostring(count))
|
'expected (3 <= count <= 7), got: '..tostring(count))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('can be stopped from the handler', function()
|
it('can be stopped from the handler', function()
|
||||||
|
@@ -7,6 +7,7 @@ local command = helpers.command
|
|||||||
local eq = helpers.eq
|
local eq = helpers.eq
|
||||||
local eval = helpers.eval
|
local eval = helpers.eval
|
||||||
local iswin = helpers.iswin
|
local iswin = helpers.iswin
|
||||||
|
local retry = helpers.retry
|
||||||
|
|
||||||
describe('terminal', function()
|
describe('terminal', function()
|
||||||
local screen
|
local screen
|
||||||
@@ -68,16 +69,19 @@ describe('terminal', function()
|
|||||||
|
|
||||||
it('forwards resize request to the program', function()
|
it('forwards resize request to the program', function()
|
||||||
feed([[<C-\><C-N>:]]) -- Go to cmdline-mode, so cursor is at bottom.
|
feed([[<C-\><C-N>:]]) -- Go to cmdline-mode, so cursor is at bottom.
|
||||||
screen:try_resize(screen._width - 3, screen._height - 2)
|
|
||||||
|
|
||||||
if iswin() then
|
if iswin() then
|
||||||
-- win: less-precise test, SIGWINCH is noisy there. #7506
|
retry(3, nil, function()
|
||||||
screen:expect{any='rows: 7, cols: 47'}
|
-- win: SIGWINCH is unreliable. #7506
|
||||||
screen:try_resize(screen._width - 6, screen._height - 3)
|
screen:try_resize(screen._width - 3, screen._height - 2)
|
||||||
screen:expect{any='rows: 4, cols: 41'}
|
screen:expect{any='rows: 7, cols: 47'}
|
||||||
|
screen:try_resize(screen._width - 6, screen._height - 3)
|
||||||
|
screen:expect{any='rows: 4, cols: 41'}
|
||||||
|
end)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
screen:try_resize(screen._width - 3, screen._height - 2)
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
tty ready |
|
tty ready |
|
||||||
rows: 7, cols: 47 |
|
rows: 7, cols: 47 |
|
||||||
|
Reference in New Issue
Block a user