diff options
-rw-r--r-- | runtime/autoload/health/provider.vim | 4 | ||||
-rw-r--r-- | runtime/doc/lsp.txt | 2 | ||||
-rw-r--r-- | src/nvim/api/buffer.c | 8 | ||||
-rw-r--r-- | src/nvim/mouse.c | 8 | ||||
-rw-r--r-- | test/functional/lua/vim_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/ui/fold_spec.lua | 14 | ||||
-rw-r--r-- | third-party/CMakeLists.txt | 22 |
7 files changed, 41 insertions, 19 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 1d720b5876..601a8f83ef 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -708,9 +708,9 @@ function! s:check_perl() abort endif call health#report_info('Nvim perl host: '. host) - let latest_cpan_cmd = 'cpanm --info Neovim::Ext' + let latest_cpan_cmd = 'cpanm --info -q Neovim::Ext' let latest_cpan = s:system(latest_cpan_cmd) - if s:shell_error || empty(latest_cpan) + if s:shell_error || empty(latest_cpan) || latest_cpan[0] ==# '!' call health#report_error('Failed to run: '. latest_cpan_cmd, \ ["Make sure you're connected to the internet.", \ 'Are you behind a firewall or proxy?']) diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 016a8be7e6..9de2aaf592 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -543,7 +543,7 @@ start_client({config}) *vim.lsp.start_client()* {root_dir} (required, string) Directory where the LSP server will base its rootUri on initialization. - {cmd} (required, string or list treated like + {cmd} (required, list treated like |jobstart()|) Base command that initiates the LSP client. {cmd_cwd} (string, default=|getcwd()|) Directory diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index a666ed92da..645fb653e5 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -1420,10 +1420,10 @@ Integer nvim_buf_add_highlight(Buffer buffer, end_line++; } - ns_id = extmark_add_decoration(buf, ns_id, hlg_id, - (int)line, (colnr_T)col_start, - end_line, (colnr_T)col_end, - VIRTTEXT_EMPTY); + extmark_add_decoration(buf, ns_id, hlg_id, + (int)line, (colnr_T)col_start, + end_line, (colnr_T)col_end, + VIRTTEXT_EMPTY); return src_id; } diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c index dab2e44890..e395654e04 100644 --- a/src/nvim/mouse.c +++ b/src/nvim/mouse.c @@ -109,12 +109,12 @@ retnomove: if (flags & MOUSE_SETPOS) goto retnomove; // ugly goto... - // Remember the character under the mouse, it might be a '-' or '+' in the - // fold column. NB: only works for ASCII chars! + // Remember the character under the mouse, might be one of foldclose or + // foldopen fillchars in the fold column. if (row >= 0 && row < Rows && col >= 0 && col <= Columns && default_grid.chars != NULL) { - mouse_char = default_grid.chars[default_grid.line_offset[row] - + (unsigned)col][0]; + mouse_char = utf_ptr2char(default_grid.chars[default_grid.line_offset[row] + + (unsigned)col]); } else { mouse_char = ' '; } diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index f549ca2bd1..ca7c5301ed 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -663,6 +663,8 @@ describe('lua stdlib', function() ]])) eq("{ {}, vim.empty_dict() }", exec_lua("return vim.inspect({{}, vim.empty_dict()})")) + eq('{}', exec_lua([[ return vim.fn.json_encode(vim.empty_dict()) ]])) + eq('{"a": {}, "b": []}', exec_lua([[ return vim.fn.json_encode({a=vim.empty_dict(), b={}}) ]])) end) it('vim.validate', function() diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index 0b788e7afb..f178ed1ac7 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -96,8 +96,20 @@ describe("folded lines", function() {1: ~}| :set rightleft | ]]} - end) + feed_command("set norightleft") + meths.input_mouse('left', 'press', '', 0, 0, 1) + screen:expect{grid=[[ + {7:▾▸}{5:^+--- 5 lines: aa··························}| + {7:│ }ff | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + :set norightleft | + ]]} + end) it("works with multibyte text", function() -- Currently the only allowed value of 'maxcombine' diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index cff063e894..a321840fef 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -295,13 +295,21 @@ if(WIN32) -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CopyFilesGlob.cmake) endif() -add_custom_target(clean-shared-libraries - COMMAND ${CMAKE_COMMAND} - -DREMOVE_FILE_GLOB=${DEPS_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}* - -P ${PROJECT_SOURCE_DIR}/cmake/RemoveFiles.cmake - DEPENDS ${THIRD_PARTY_DEPS} -) +# clean-shared-libraries removes ${DEPS_INSTALL_DIR}/lib/nvim/parser/c.dll, +# resulting in MSVC build failure in CI. +if (MSVC) + set(ALL_DEPS ${THIRD_PARTY_DEPS}) +else() + add_custom_target(clean-shared-libraries + COMMAND ${CMAKE_COMMAND} + -DREMOVE_FILE_GLOB=${DEPS_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}* + -P ${PROJECT_SOURCE_DIR}/cmake/RemoveFiles.cmake + DEPENDS ${THIRD_PARTY_DEPS} + ) + set(ALL_DEPS clean-shared-libraries) +endif() add_custom_target(third-party ALL COMMAND ${CMAKE_COMMAND} -E touch .third-party - DEPENDS clean-shared-libraries) + DEPENDS ${ALL_DEPS} +) |