Use word-boundary wrapping and count-aware displayed-line movement in ordinary buffers. Escape cancels Blink completion before falling back. Preserve the existing ergonomics check; it was not rerun during Git cleanup.
19 lines
849 B
Lua
19 lines
849 B
Lua
-- Configured startup: nvim --headless -i NONE '+lua local ok,e=pcall(dofile,"tests/neovim-ergonomics.lua"); if not ok then print(e); vim.cmd.cquit() end' '+qa!'
|
|
assert(vim.o.linebreak)
|
|
vim.api.nvim_buf_set_lines(0, 0, -1, false, { string.rep("word ", 80), "two", "three", "four" })
|
|
vim.cmd("normal gg0j")
|
|
assert(vim.fn.line(".") == 1 and vim.fn.col(".") > 1)
|
|
vim.cmd("normal k")
|
|
assert(vim.fn.line(".") == 1 and vim.fn.col(".") == 1)
|
|
vim.cmd("normal 3j")
|
|
assert(vim.fn.line(".") == 4)
|
|
vim.cmd("normal 3k")
|
|
assert(vim.fn.line(".") == 1)
|
|
assert(vim.fn.maparg("j", "o") == "")
|
|
vim.bo.buftype = "nofile"
|
|
vim.cmd("normal j")
|
|
assert(vim.fn.line(".") == 2)
|
|
vim.cmd("doautocmd InsertEnter")
|
|
assert(vim.deep_equal(require("blink.cmp.config").keymap["<Esc>"], { "cancel", "fallback" }))
|
|
print("Neovim motion and completion configuration smoke check passed")
|