diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-24 17:18:25 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-25 10:20:29 -0500 |
commit | 43834b24ac6037ec7678872877d3370134e46024 (patch) | |
tree | 61c974e7925f08fd6ba364ba0165922c3ef4acd2 /src/nvim/eval.c | |
parent | 1e823986e98721d7fda9a7d28fb9c085fdbc73a6 (diff) | |
download | rneovim-43834b24ac6037ec7678872877d3370134e46024.tar.gz rneovim-43834b24ac6037ec7678872877d3370134e46024.tar.bz2 rneovim-43834b24ac6037ec7678872877d3370134e46024.zip |
vim-patch:8.2.2206: :exe command line completion only works for first argument
Problem: :exe command line completion only works for first argument.
Solution: Skip over text if more is following. (closes vim/vim#7546)
https://github.com/vim/vim/commit/4941b5effd7f6a26583a949c92ee50276a3b43f9
Port "IS_WHITE_OR_NUL" macro from patch v8.2.0562
as "ascii_iswhite_or_nul()" inline function.
N/A patches for version.c:
vim-patch:8.2.0782: cannot build with Lua on MS-Windows
Problem: Cannot build with Lua on MS-Windows.
Solution: Add DLL symbol for luaL_Loadstring. (Ken Takata)
https://github.com/vim/vim/commit/df1643a6a7886b9363c2a98438e61cbe1c803d41
vim-patch:8.2.0856: CTRL-S stops output
Problem: CTRL-S stops output.
Solution: Invert the IXON flag. (closes vim/vim#6166)
https://github.com/vim/vim/commit/928eec649b8af389de0fdb7aba2034d27df3e058
vim-patch:8.2.1212: cannot build with Lua 5.4
Problem: Cannot build with Lua 5.4.
Solution: Use luaL_typeerror instead defining it. (closes vim/vim#6454)
https://github.com/vim/vim/commit/5551b131daef3a621a28dcbbe118920f5b9fabe6
vim-patch:8.2.2211: MS-Windows: can't load Python dll if not in the path
Problem: MS-Windows: can't load Python dll if not in the path.
Solution: Use the InstallPath registry entry. (Kelvin Lee, closes vim/vim#7540)
https://github.com/vim/vim/commit/b2f9e0e2c537bcde16dab3b62687a17e17849ce1
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index cc707c0c84..10a382ec4e 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2556,6 +2556,7 @@ void free_for_info(void *fi_void) void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx) + FUNC_ATTR_NONNULL_ALL { int got_eq = FALSE; int c; @@ -2638,6 +2639,23 @@ void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx) } } } + + // ":exe one two" completes "two" + if ((cmdidx == CMD_execute + || cmdidx == CMD_echo + || cmdidx == CMD_echon + || cmdidx == CMD_echomsg) + && xp->xp_context == EXPAND_EXPRESSION) { + for (;;) { + char_u *const n = skiptowhite(arg); + + if (n == arg || ascii_iswhite_or_nul(*skipwhite(n))) { + break; + } + arg = skipwhite(n); + } + } + xp->xp_pattern = arg; } |