aboutsummaryrefslogtreecommitdiff
path: root/src/nvim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim')
-rw-r--r--src/nvim/CMakeLists.txt6
-rw-r--r--src/nvim/api/vim.c4
-rw-r--r--src/nvim/eval.lua7
-rw-r--r--src/nvim/ex_getln.c36
-rw-r--r--src/nvim/option.c2
-rw-r--r--src/nvim/vvars.lua2
6 files changed, 18 insertions, 39 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 0ba2eeb376..cb71144130 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -750,6 +750,7 @@ add_custom_target(nvim_runtime_deps)
if(WIN32)
# Copy DLLs and third-party tools to bin/ and install them along with nvim
add_custom_command(TARGET nvim_runtime_deps
+ POST_BUILD
COMMAND ${CMAKE_COMMAND} -E ${COPY_DIRECTORY} ${PROJECT_BINARY_DIR}/windows_runtime_deps/
${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
install(DIRECTORY ${PROJECT_BINARY_DIR}/windows_runtime_deps/
@@ -791,7 +792,10 @@ file(MAKE_DIRECTORY ${BINARY_LIB_DIR})
# install treesitter parser if bundled
if(EXISTS ${DEPS_PREFIX}/lib/nvim/parser)
- add_custom_command(TARGET nvim_runtime_deps COMMAND ${CMAKE_COMMAND} -E ${COPY_DIRECTORY} ${DEPS_PREFIX}/lib/nvim/parser ${BINARY_LIB_DIR}/parser)
+ add_custom_command(
+ TARGET nvim_runtime_deps
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E ${COPY_DIRECTORY} ${DEPS_PREFIX}/lib/nvim/parser ${BINARY_LIB_DIR}/parser)
endif()
install(DIRECTORY ${BINARY_LIB_DIR}
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 943c67ac8e..97cda49a22 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -781,8 +781,8 @@ void nvim_set_vvar(String name, Object value, Error *err)
/// can be omitted for no highlight.
/// @param history if true, add to |message-history|.
/// @param opts Optional parameters.
-/// - verbose: Message was printed as a result of 'verbose' option
-/// if Nvim was invoked with -V3log_file, the message will be
+/// - verbose: Message is printed as a result of 'verbose' option.
+/// If Nvim was invoked with -V3log_file, the message will be
/// redirected to the log_file and suppressed from direct output.
void nvim_echo(Array chunks, Boolean history, Dict(echo_opts) *opts, Error *err)
FUNC_API_SINCE(7)
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index 870eb17b9e..a418b34909 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -1137,7 +1137,7 @@ M.funcs = {
]=],
name = 'charcol',
- params = { { 'expr', 'string|integer[]' }, { 'winid', 'integer' } },
+ params = { { 'expr', 'string|any[]' }, { 'winid', 'integer' } },
returns = 'integer',
signature = 'charcol({expr} [, {winid}])',
},
@@ -1296,7 +1296,7 @@ M.funcs = {
]=],
name = 'col',
- params = { { 'expr', 'string|integer[]' }, { 'winid', 'integer' } },
+ params = { { 'expr', 'string|any[]' }, { 'winid', 'integer' } },
returns = 'integer',
signature = 'col({expr} [, {winid}])',
},
@@ -2165,6 +2165,7 @@ M.funcs = {
If {expr} starts with "./" the |current-directory| is used.
]=],
+ fast = true,
name = 'exepath',
params = { { 'expr', 'string' } },
signature = 'exepath({expr})',
@@ -12683,7 +12684,7 @@ M.funcs = {
]=],
name = 'virtcol',
- params = { { 'expr', 'string|integer[]' }, { 'list', 'boolean' }, { 'winid', 'integer' } },
+ params = { { 'expr', 'string|any[]' }, { 'list', 'boolean' }, { 'winid', 'integer' } },
signature = 'virtcol({expr} [, {list} [, {winid}]])',
},
virtcol2col = {
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index dda1a18fa6..9c606c9606 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -3596,38 +3596,14 @@ void put_on_cmdline(const char *str, int len, bool redraw)
memmove(ccline.cmdbuff + ccline.cmdpos, str, (size_t)len);
ccline.cmdbuff[ccline.cmdlen] = NUL;
- {
- // When the inserted text starts with a composing character,
- // backup to the character before it. There could be two of them.
- int i = 0;
- int c = utf_ptr2char(ccline.cmdbuff + ccline.cmdpos);
- // TODO(bfredl): this can be corrected/simplified as utf_head_off implements the
- // correct grapheme cluster breaks
- while (ccline.cmdpos > 0 && utf_iscomposing_legacy(c)) {
- i = utf_head_off(ccline.cmdbuff, ccline.cmdbuff + ccline.cmdpos - 1) + 1;
+ // When the inserted text starts with a composing character,
+ // backup to the character before it.
+ if (ccline.cmdpos > 0 && (uint8_t)ccline.cmdbuff[ccline.cmdpos] >= 0x80) {
+ int i = utf_head_off(ccline.cmdbuff, ccline.cmdbuff + ccline.cmdpos);
+ if (i != 0) {
ccline.cmdpos -= i;
len += i;
- c = utf_ptr2char(ccline.cmdbuff + ccline.cmdpos);
- }
- if (i == 0 && ccline.cmdpos > 0 && arabic_maycombine(c)) {
- // Check the previous character for Arabic combining pair.
- i = utf_head_off(ccline.cmdbuff, ccline.cmdbuff + ccline.cmdpos - 1) + 1;
- if (arabic_combine(utf_ptr2char(ccline.cmdbuff + ccline.cmdpos - i), c)) {
- ccline.cmdpos -= i;
- len += i;
- } else {
- i = 0;
- }
- }
- if (i != 0) {
- // Also backup the cursor position.
- i = ptr2cells(ccline.cmdbuff + ccline.cmdpos);
- ccline.cmdspos -= i;
- msg_col -= i;
- if (msg_col < 0) {
- msg_col += Columns;
- msg_row--;
- }
+ ccline.cmdspos = cmd_screencol(ccline.cmdpos);
}
}
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 0396f7740e..c7aaf7975d 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -3282,8 +3282,6 @@ static char *option_get_valid_types(OptIndex opt_idx)
// Ensure that the string is NUL-terminated.
kv_push(str, NUL);
return str.items;
-
-#undef OPTION_ADD_TYPE
}
/// Check if option is hidden.
diff --git a/src/nvim/vvars.lua b/src/nvim/vvars.lua
index ad139bbbfe..4936f62e3e 100644
--- a/src/nvim/vvars.lua
+++ b/src/nvim/vvars.lua
@@ -177,7 +177,7 @@ M.vars = {
inclusive Motion is |inclusive|, else exclusive.
scope Event-specific scope name.
operator Current |operator|. Also set for Ex
- commands (unlike |v:operator|). For
+ commands (unlike |v:operator|). For
example if |TextYankPost| is triggered
by the |:yank| Ex command then
`v:event.operator` is "y".