aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/news.yml7
-rw-r--r--CMakeLists.txt10
-rw-r--r--Makefile4
-rw-r--r--cmake.config/config.h.in2
-rw-r--r--cmake.deps/cmake/BuildLuarocks.cmake2
-rw-r--r--runtime/lua/nvim/health.lua11
-rw-r--r--runtime/lua/vim/filetype.lua3
-rwxr-xr-xscripts/bump_deps.lua2
-rwxr-xr-xsrc/nvim/CMakeLists.txt7
-rw-r--r--src/nvim/eval/funcs.c3
-rw-r--r--src/nvim/highlight.c10
-rw-r--r--src/nvim/highlight_defs.h4
-rw-r--r--src/nvim/highlight_group.c9
-rw-r--r--src/nvim/optionstr.c3
-rw-r--r--src/nvim/testdir/test_filetype.vim4
-rw-r--r--src/nvim/testdir/test_virtualedit.vim13
-rw-r--r--test/functional/api/highlight_spec.lua6
-rw-r--r--test/functional/fixtures/fake-lsp-server.lua12
-rw-r--r--test/functional/plugin/lsp/helpers.lua9
-rw-r--r--test/functional/plugin/lsp_spec.lua8
20 files changed, 67 insertions, 62 deletions
diff --git a/.github/workflows/news.yml b/.github/workflows/news.yml
index 46ac0ec02d..11807e9b42 100644
--- a/.github/workflows/news.yml
+++ b/.github/workflows/news.yml
@@ -22,9 +22,10 @@ jobs:
{
echo "
Pull request includes a new feature or a breaking change, but
- news.txt hasn't been updated yet. news.txt is our primary way of
- communicating changes to users so it's important to keep it up to
- date."
+ news.txt hasn't been updated yet. This is just a reminder
+ that news.txt may need to be updated. You can ignore this CI
+ failure if you think the change won't be of interest to
+ users."
exit 1
}
fi
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 493c212996..095750328a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,6 +31,11 @@ set(TOUCHES_DIR ${PROJECT_BINARY_DIR}/touches)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+find_program(CCACHE_PRG ccache)
+if(CCACHE_PRG)
+ set(CMAKE_C_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env CCACHE_SLOPPINESS=pch_defines,time_macros ${CCACHE_PRG})
+endif()
+
# Prefer our bundled versions of dependencies.
if(DEFINED ENV{DEPS_BUILD_DIR})
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
@@ -112,11 +117,6 @@ endif()
message(STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
set_default_buildtype()
-if(CMAKE_BUILD_TYPE MATCHES Debug)
- set(DEBUG 1)
-else()
- set(DEBUG 0)
-endif()
# If not in a git repo (e.g., a tarball) these tokens define the complete
# version string, else they are combined with the result of `git describe`.
diff --git a/Makefile b/Makefile
index 1ba2431ba2..be1eef92de 100644
--- a/Makefile
+++ b/Makefile
@@ -132,7 +132,7 @@ functionaltest-lua: | nvim
FORMAT=formatc formatlua format
LINT=lintlua lintsh lintc check-single-includes lintcommit lint
TEST=functionaltest unittest
-generated-sources benchmark $(FORMAT) $(LINT) $(TEST): | build/.ran-cmake
+generated-sources benchmark uninstall $(FORMAT) $(LINT) $(TEST): | build/.ran-cmake
$(CMAKE_PRG) --build build --target $@
test: $(TEST)
@@ -173,4 +173,4 @@ $(DEPS_BUILD_DIR)/%: phony_force
$(BUILD_TOOL) -C $(DEPS_BUILD_DIR) $(patsubst $(DEPS_BUILD_DIR)/%,%,$@)
endif
-.PHONY: test clean distclean nvim libnvim cmake deps install appimage checkprefix benchmark $(FORMAT) $(LINT) $(TEST)
+.PHONY: test clean distclean nvim libnvim cmake deps install appimage checkprefix benchmark uninstall $(FORMAT) $(LINT) $(TEST)
diff --git a/cmake.config/config.h.in b/cmake.config/config.h.in
index c8377bf45c..4669e42c0f 100644
--- a/cmake.config/config.h.in
+++ b/cmake.config/config.h.in
@@ -1,8 +1,6 @@
#ifndef AUTO_CONFIG_H
#define AUTO_CONFIG_H
-#cmakedefine DEBUG
-
#cmakedefine SIZEOF_INT @SIZEOF_INT@
#cmakedefine SIZEOF_INTMAX_T @SIZEOF_INTMAX_T@
#cmakedefine SIZEOF_INT32_T @SIZEOF_INT32_T@
diff --git a/cmake.deps/cmake/BuildLuarocks.cmake b/cmake.deps/cmake/BuildLuarocks.cmake
index d0b4a8e7d1..b84ce34d45 100644
--- a/cmake.deps/cmake/BuildLuarocks.cmake
+++ b/cmake.deps/cmake/BuildLuarocks.cmake
@@ -148,7 +148,7 @@ if(USE_BUNDLED_BUSTED)
set(LUACHECK_EXE "${DEPS_BIN_DIR}/luacheck")
endif()
add_custom_command(OUTPUT ${BUSTED_EXE}
- COMMAND ${LUAROCKS_BINARY} build busted 2.0.0 ${LUAROCKS_BUILDARGS}
+ COMMAND ${LUAROCKS_BINARY} build busted 2.1.1 ${LUAROCKS_BUILDARGS}
DEPENDS penlight)
add_custom_target(busted DEPENDS ${BUSTED_EXE})
diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua
index b76106f241..f11899434e 100644
--- a/runtime/lua/nvim/health.lua
+++ b/runtime/lua/nvim/health.lua
@@ -156,13 +156,10 @@ local function check_performance()
health.report_ok(buildtype)
else
health.report_info(buildtype)
- health.report_warn(
- 'Non-optimized ' .. (has('debug') and '(DEBUG) ' or '') .. 'build. Nvim will be slower.',
- {
- 'Install a different Nvim package, or rebuild with `CMAKE_BUILD_TYPE=RelWithDebInfo`.',
- suggest_faq,
- }
- )
+ health.report_warn('Non-optimized debug build. Nvim will be slower.', {
+ 'Install a different Nvim package, or rebuild with `CMAKE_BUILD_TYPE=RelWithDebInfo`.',
+ suggest_faq,
+ })
end
-- check for slow shell invocation
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 9293c828b8..b356f3d7aa 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -226,6 +226,7 @@ local extension = {
hook = function(path, bufnr)
return M.getlines(bufnr, 1) == '[Trigger]' and 'conf'
end,
+ nmconnection = 'confini',
mklx = 'context',
mkiv = 'context',
mkii = 'context',
@@ -331,6 +332,7 @@ local extension = {
am = 'elf',
exs = 'elixir',
elm = 'elm',
+ lc = 'elsa',
elv = 'elvish',
ent = function(path, bufnr)
return require('vim.filetype.detect').ent(bufnr)
@@ -567,6 +569,7 @@ local extension = {
libsonnet = 'jsonnet',
jsp = 'jsp',
jl = 'julia',
+ kdl = 'kdl',
kv = 'kivy',
kix = 'kix',
kts = 'kotlin',
diff --git a/scripts/bump_deps.lua b/scripts/bump_deps.lua
index 1873c3cd0d..f980e800cf 100755
--- a/scripts/bump_deps.lua
+++ b/scripts/bump_deps.lua
@@ -54,7 +54,7 @@ local function run_die(cmd, err_msg)
end
local function require_executable(cmd)
- local cmd_path = run_die({ 'command', '-v', cmd }, cmd .. ' not found!')
+ local cmd_path = run_die({ 'sh', '-c', 'command -v ' .. cmd }, cmd .. ' not found!')
run_die({ 'test', '-x', cmd_path }, cmd .. ' is not executable')
end
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index d1bf08f3fb..77ed0490d8 100755
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -688,13 +688,6 @@ set_target_properties(nvim
EXPORT_COMPILE_COMMANDS ON
ENABLE_EXPORTS TRUE)
-find_program(CCACHE_PRG ccache)
-if(CCACHE_PRG)
- set_target_properties(nvim
- PROPERTIES
- C_COMPILER_LAUNCHER "${CMAKE_COMMAND};-E;env;CCACHE_SLOPPINESS=pch_defines,time_macros;${CCACHE_PRG}")
-endif()
-
if(${CMAKE_VERSION} VERSION_LESS 3.20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
endif()
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index 938fef9a52..48f3cd4293 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -3064,9 +3064,6 @@ static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
"conceal",
"cursorbind",
"cursorshape",
-#ifdef DEBUG
- "debug",
-#endif
"dialog_con",
"diff",
"digraphs",
diff --git a/src/nvim/highlight.c b/src/nvim/highlight.c
index 9dab91cc2b..c20eac3c28 100644
--- a/src/nvim/highlight.c
+++ b/src/nvim/highlight.c
@@ -842,14 +842,14 @@ void hlattrs2dict(Dictionary *dict, HlAttrs ae, bool use_rgb)
PUT_C(hl, "underline", BOOLEAN_OBJ(true));
break;
- case HL_UNDERDOUBLE:
- PUT_C(hl, "underdouble", BOOLEAN_OBJ(true));
- break;
-
case HL_UNDERCURL:
PUT_C(hl, "undercurl", BOOLEAN_OBJ(true));
break;
+ case HL_UNDERDOUBLE:
+ PUT_C(hl, "underdouble", BOOLEAN_OBJ(true));
+ break;
+
case HL_UNDERDOTTED:
PUT_C(hl, "underdotted", BOOLEAN_OBJ(true));
break;
@@ -930,8 +930,8 @@ HlAttrs dict2hlattrs(Dict(highlight) *dict, bool use_rgb, int *link_id, Error *e
CHECK_FLAG(dict, mask, bold, , HL_BOLD);
CHECK_FLAG(dict, mask, italic, , HL_ITALIC);
CHECK_FLAG(dict, mask, underline, , HL_UNDERLINE);
- CHECK_FLAG(dict, mask, underdouble, , HL_UNDERDOUBLE);
CHECK_FLAG(dict, mask, undercurl, , HL_UNDERCURL);
+ CHECK_FLAG(dict, mask, underdouble, , HL_UNDERDOUBLE);
CHECK_FLAG(dict, mask, underdotted, , HL_UNDERDOTTED);
CHECK_FLAG(dict, mask, underdashed, , HL_UNDERDASHED);
CHECK_FLAG(dict, mask, standout, , HL_STANDOUT);
diff --git a/src/nvim/highlight_defs.h b/src/nvim/highlight_defs.h
index a4dcf6eb60..95c81ac9db 100644
--- a/src/nvim/highlight_defs.h
+++ b/src/nvim/highlight_defs.h
@@ -18,8 +18,8 @@ typedef enum {
// The next three bits are all underline styles
HL_UNDERLINE_MASK = 0x38,
HL_UNDERLINE = 0x08,
- HL_UNDERDOUBLE = 0x10,
- HL_UNDERCURL = 0x18,
+ HL_UNDERCURL = 0x10,
+ HL_UNDERDOUBLE = 0x18,
HL_UNDERDOTTED = 0x20,
HL_UNDERDASHED = 0x28,
// 0x30 and 0x38 spare for underline styles
diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c
index 5b1ea9967d..3d91335f55 100644
--- a/src/nvim/highlight_group.c
+++ b/src/nvim/highlight_group.c
@@ -1553,12 +1553,17 @@ static bool highlight_list_arg(const int id, bool didh, const int type, int iarg
} else { // type == LIST_ATTR
buf[0] = NUL;
for (int i = 0; hl_attr_table[i] != 0; i++) {
- if (iarg & hl_attr_table[i]) {
+ if (((hl_attr_table[i] & HL_UNDERLINE_MASK)
+ && ((iarg & HL_UNDERLINE_MASK) == hl_attr_table[i]))
+ || (!(hl_attr_table[i] & HL_UNDERLINE_MASK)
+ && (iarg & hl_attr_table[i]))) {
if (buf[0] != NUL) {
xstrlcat(buf, ",", 100);
}
xstrlcat(buf, hl_name_table[i], 100);
- iarg &= ~hl_attr_table[i]; // don't want "inverse"
+ if (!(hl_attr_table[i] & HL_UNDERLINE_MASK)) {
+ iarg &= ~hl_attr_table[i]; // don't want "inverse"
+ }
}
}
}
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c
index 5ebff9ed77..30afb0db37 100644
--- a/src/nvim/optionstr.c
+++ b/src/nvim/optionstr.c
@@ -1404,10 +1404,11 @@ static void did_set_virtualedit(win_T *win, int opt_flags, char *oldval, char **
} else {
if (opt_strings_flags(ve, p_ve_values, flags, true) != OK) {
*errmsg = e_invarg;
- } else if (strcmp(p_ve, oldval) != 0) {
+ } else if (strcmp(ve, oldval) != 0) {
// Recompute cursor position in case the new 've' setting
// changes something.
validate_virtcol_win(win);
+ // XXX: this only works when win == curwin
coladvance(win->w_virtcol);
}
}
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index cddb1349f5..e366fd23ad 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -123,7 +123,7 @@ let s:filename_checks = {
\ 'conaryrecipe': ['file.recipe'],
\ 'conf': ['auto.master'],
\ 'config': ['configure.in', 'configure.ac', '/etc/hostname.file', 'any/etc/hostname.file'],
- \ 'confini': ['/etc/pacman.conf', 'any/etc/pacman.conf', 'mpv.conf', 'any/.aws/config', 'any/.aws/credentials'],
+ \ 'confini': ['/etc/pacman.conf', 'any/etc/pacman.conf', 'mpv.conf', 'any/.aws/config', 'any/.aws/credentials', 'file.nmconnection'],
\ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'],
\ 'cook': ['file.cook'],
\ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh'],
@@ -181,6 +181,7 @@ let s:filename_checks = {
\ 'elixir': ['file.ex', 'file.exs', 'mix.lock'],
\ 'elm': ['file.elm'],
\ 'elmfilt': ['filter-rules'],
+ \ 'elsa': ['file.lc'],
\ 'elvish': ['file.elv'],
\ 'epuppet': ['file.epp'],
\ 'erlang': ['file.erl', 'file.hrl', 'file.yaws'],
@@ -301,6 +302,7 @@ let s:filename_checks = {
\ 'jsp': ['file.jsp'],
\ 'julia': ['file.jl'],
\ 'kconfig': ['Kconfig', 'Kconfig.debug', 'Kconfig.file'],
+ \ 'kdl': ['file.kdl'],
\ 'kivy': ['file.kv'],
\ 'kix': ['file.kix'],
\ 'kotlin': ['file.kt', 'file.ktm', 'file.kts'],
diff --git a/src/nvim/testdir/test_virtualedit.vim b/src/nvim/testdir/test_virtualedit.vim
index 2bf8c3fc77..20a5f87517 100644
--- a/src/nvim/testdir/test_virtualedit.vim
+++ b/src/nvim/testdir/test_virtualedit.vim
@@ -537,6 +537,19 @@ func Test_global_local_virtualedit()
set virtualedit&
endfunc
+func Test_virtualedit_setlocal()
+ enew
+ setglobal virtualedit=all
+ setlocal virtualedit=all
+ normal! l
+ redraw
+ setlocal virtualedit=none
+ call assert_equal(1, wincol())
+
+ setlocal virtualedit&
+ set virtualedit&
+endfunc
+
func Test_virtualedit_mouse()
let save_mouse = &mouse
set mouse=a
diff --git a/test/functional/api/highlight_spec.lua b/test/functional/api/highlight_spec.lua
index 5941d4c68b..7f044977cb 100644
--- a/test/functional/api/highlight_spec.lua
+++ b/test/functional/api/highlight_spec.lua
@@ -214,7 +214,7 @@ describe("API: set highlight", function()
bold = true,
italic = true,
reverse = true,
- underline = true,
+ underdashed = true,
strikethrough = true,
altfont = true,
cterm = {
@@ -231,7 +231,7 @@ describe("API: set highlight", function()
bold = true,
italic = true,
reverse = true,
- underline = true,
+ underdashed = true,
strikethrough = true,
altfont = true,
}
@@ -297,7 +297,7 @@ describe("API: set highlight", function()
exec_capture('highlight Test_hl'))
meths.set_hl(0, 'Test_hl2', highlight3_config)
- eq('Test_hl2 xxx cterm=italic,reverse,strikethrough,altfont,nocombine ctermfg=8 ctermbg=15 gui=bold,underline,italic,reverse,strikethrough,altfont guifg=#ff0000 guibg=#0032aa',
+ eq('Test_hl2 xxx cterm=italic,reverse,strikethrough,altfont,nocombine ctermfg=8 ctermbg=15 gui=bold,underdashed,italic,reverse,strikethrough,altfont guifg=#ff0000 guibg=#0032aa',
exec_capture('highlight Test_hl2'))
-- Colors are stored with the name they are defined, but
diff --git a/test/functional/fixtures/fake-lsp-server.lua b/test/functional/fixtures/fake-lsp-server.lua
index aa47198f7a..db0c8c0c3f 100644
--- a/test/functional/fixtures/fake-lsp-server.lua
+++ b/test/functional/fixtures/fake-lsp-server.lua
@@ -927,10 +927,13 @@ function tests.basic_formatting()
}
end
--- Tests will be indexed by TEST_NAME
+-- Tests will be indexed by test_name
+local test_name = arg[1]
+local timeout = arg[2]
+assert(type(test_name) == 'string', 'test_name must be specified as first arg.')
local kill_timer = vim.loop.new_timer()
-kill_timer:start(_G.TIMEOUT or 1e3, 0, function()
+kill_timer:start(timeout or 1e3, 0, function()
kill_timer:stop()
kill_timer:close()
log('ERROR', 'LSP', 'TIMEOUT')
@@ -938,14 +941,11 @@ kill_timer:start(_G.TIMEOUT or 1e3, 0, function()
os.exit(100)
end)
-local test_name = _G.TEST_NAME -- lualint workaround
-assert(type(test_name) == 'string', 'TEST_NAME must be specified.')
local status, err = pcall(assert(tests[test_name], "Test not found"))
kill_timer:stop()
kill_timer:close()
if not status then
log('ERROR', 'LSP', tostring(err))
io.stderr:write(err)
- os.exit(101)
+ vim.cmd [[101cquit]]
end
-os.exit(0)
diff --git a/test/functional/plugin/lsp/helpers.lua b/test/functional/plugin/lsp/helpers.lua
index 028ccb9e2c..caab174b4d 100644
--- a/test/functional/plugin/lsp/helpers.lua
+++ b/test/functional/plugin/lsp/helpers.lua
@@ -80,17 +80,14 @@ M.fake_lsp_logfile = 'Xtest-fake-lsp.log'
local function fake_lsp_server_setup(test_name, timeout_ms, options, settings)
exec_lua([=[
lsp = require('vim.lsp')
- local test_name, fixture_filename, logfile, timeout, options, settings = ...
+ local test_name, fake_lsp_code, fake_lsp_logfile, timeout, options, settings = ...
TEST_RPC_CLIENT_ID = lsp.start_client {
cmd_env = {
- NVIM_LOG_FILE = logfile;
+ NVIM_LOG_FILE = fake_lsp_logfile;
NVIM_LUA_NOTRACK = "1";
};
cmd = {
- vim.v.progpath, '-Es', '-u', 'NONE', '--headless',
- "-c", string.format("lua TEST_NAME = %q", test_name),
- "-c", string.format("lua TIMEOUT = %d", timeout),
- "-c", "luafile "..fixture_filename,
+ vim.v.progpath, '-l', fake_lsp_code, test_name, tostring(timeout),
};
handlers = setmetatable({}, {
__index = function(t, method)
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index 5229022564..fd162961ff 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -46,16 +46,14 @@ describe('LSP', function()
local test_name = "basic_init"
exec_lua([=[
lsp = require('vim.lsp')
- local test_name, fixture_filename, logfile = ...
+ local test_name, fake_lsp_code, fake_lsp_logfile = ...
function test__start_client()
return lsp.start_client {
cmd_env = {
- NVIM_LOG_FILE = logfile;
+ NVIM_LOG_FILE = fake_lsp_logfile;
};
cmd = {
- vim.v.progpath, '-Es', '-u', 'NONE', '--headless',
- "-c", string.format("lua TEST_NAME = %q", test_name),
- "-c", "luafile "..fixture_filename;
+ vim.v.progpath, '-l', fake_lsp_code, test_name;
};
workspace_folders = {{
uri = 'file://' .. vim.loop.cwd(),