Commit Graph

15664 Commits

Author SHA1 Message Date
Justin M. Keyes
a2efc9cf8b
loop_close: timout after 2 seconds #11821
never UV_RUN_DEFAULT
ref #11820
ref #7376
2020-02-16 23:54:24 -08:00
Justin M. Keyes
b353a5c05f
test: always dump logs on failure #11886
Whenever `eq()`, `ok()`, etc. fails, include log tail in the failure
message. This helps to correlate log messages with a particular test
failure.
2020-02-16 23:30:24 -08:00
Justin M. Keyes
03f245c0b8
Merge #11873 from janlazo/vim-8.1.0786
vim-patch:8.0.1660,8.1.{43,786,1201,2129,2131,2187,2223,2259},8.2.{241,267}
2020-02-16 23:18:24 -08:00
Justin M. Keyes
0c5d2ffebe
Merge #11837 'LSP: fixes, improve test visibility' 2020-02-16 23:02:23 -08:00
Justin M. Keyes
6e13b9d261 test/LSP: assert contents of log file 2020-02-16 22:09:28 -08:00
Justin M. Keyes
a446fbc8fa lsp/rpc.lua: fix env application function
Env vars must be merged with the current env.
2020-02-16 22:09:28 -08:00
Justin M. Keyes
4cf48dc329 test/LSP: dump logs on error
This will help debug CI flakey failures.

TODO: helpers.assert_log()  -- Explicitly check contents of the logfile.
2020-02-16 19:04:40 -08:00
Justin M. Keyes
1eb0f5371a LSP: fix validate_client_config
- `cmd_env` is a table not a function.
- tests: Set $NVIM_LOG_FILE for fake LSP server.
2020-02-16 17:53:33 -08:00
Justin M. Keyes
c15bd6cd27 test/LSP: use less-generic exit code
- os.exit(1) is too generic, since code 1 may be caused by Nvim exiting
  for some other reason.  Change it to os.exit(101).
- style: de-architect json_encode/json_decode calls.

Failure seen in travis macOS job:
https://travis-ci.org/neovim/neovim/jobs/647849133

    [  FAILED  ] test/functional/plugin/lsp_spec.lua@ 266 SP basic_init test should not send didOpen if the buffer closes before init
    test/functional/plugin/lsp_spec.lua:297: exit code
    Expected objects to be the same.
    Passed in:
    (number) 1
    Expected:
    (number) 0
    stack traceback:
      test/functional/plugin/lsp_spec.lua:297: in function 'on_exit'
      test/functional/plugin/lsp_spec.lua💯 in function 'test_rpc_server'
      test/functional/plugin/lsp_spec.lua:272: in function <test/functional/plugin/lsp_spec.lua:266>
2020-02-16 17:52:48 -08:00
Justin M. Keyes
b04165859d test: style 2020-02-16 17:24:21 -08:00
Justin M. Keyes
322b2731ed deps: lua-client 0.2.2-1 2020-02-16 17:24:21 -08:00
Jan Edmund Lazo
1ce4b3c9a7
vim-patch:8.2.0267: no check for a following cmd when calling a function fails
Problem:    No check for a following command when calling a function fails.
Solution:   Also check for a following command when inside a try block.
            (closes vim/vim#5642)
e51bb17dd0
2020-02-16 18:04:44 -05:00
Jan Edmund Lazo
acc5fd9fac
vim-patch:8.1.0043: ++bad argument of :edit does not work properly
Problem:    ++bad argument of :edit does not work properly.
Solution:   Return FAIL from get_bad_opt() only when there is no valid
            argument. (Dominique Pelle, Christian Brabandt, closes vim/vim#2966,
            closes vim/vim#2947)
7580849df9
2020-02-16 09:38:15 -05:00
Jan Edmund Lazo
18d86283b0
vim-patch:8.0.1660: the terminal API "drop" command doesn't support options
Problem:    The terminal API "drop" command doesn't support options.
Solution:   Implement the options.
333b80acf3
2020-02-16 09:38:14 -05:00
Jan Edmund Lazo
7955c05acc
vim-patch:8.1.1201: output of :command is hard to read
Problem:    Output of :command is hard to read.
Solution:   Make some columns wider, some narrower.  Truncate the command when
            listing all.
725310d89e
2020-02-16 07:49:44 -05:00
Jan Edmund Lazo
986eafce47
vim-patch:8.1.2187: error for bad regexp even though regexp is not used
Problem:    Error for bad regexp even though regexp is not used when writing
            a file. (Arseny Nasokin)
Solution:   Ignore regexp errors. (closes vim/vim#5059)
b40c2576d4
2020-02-16 07:49:44 -05:00
Jan Edmund Lazo
5e38516a46
vim-patch:8.2.0241: crash when setting 'buftype' to "quickfix"
Problem:    Crash when setting 'buftype' to "quickfix".
Solution:   Check that error list is not NULL. (closes vim/vim#5613)
99234f29aa
2020-02-16 07:49:44 -05:00
Jan Edmund Lazo
bde4f47eb2
vim-patch:8.1.2223: cannot see what buffer an ml_get error is for
Problem:    Cannot see what buffer an ml_get error is for.
Solution:   Add the buffer number and name in the message
cb86893114
2020-02-16 07:49:44 -05:00
Jan Edmund Lazo
0f5bb9faf1
vim-patch:8.1.0786: ml_get error when updating the status line
Problem:    ml_get error when updating the status line and a terminal had its
            scrollback cleared.  (Chris Patuzzo)
Solution:   Check the cursor position when drawing the status line.
            (closes vim/vim#3830)
10772307c4
2020-02-16 07:49:43 -05:00
Jan Edmund Lazo
4907bc2626
vim-patch:8.1.2259: running tests may leave XfakeHOME behind
Problem:    Running tests may leave XfakeHOME behind.
Solution:   Source summarize.vim without using setup.vim. (closes vim/vim#5177)
            Also fix that on MS-Windows the test log isn't echoed.
7d2320414f
2020-02-16 07:49:43 -05:00
Jan Edmund Lazo
e52c22d63c
vim-patch:8.1.2131: MSVC tests fail
Problem:    MSVC tests fail.
Solution:   Replace backslashes with slashes.
c25e702dee
2020-02-16 07:49:43 -05:00
Jan Edmund Lazo
e5aeb2e193
vim-patch:8.1.2129: using hard coded executable path in test
Problem:    Using hard coded executable path in test.
Solution:   Use v:progpath. Use $VIMRUNTIME instead of "runtime". (James
            McCoy, closes vim/vim#5025)
1ac41a5c13
2020-02-16 07:49:43 -05:00
Jan Edmund Lazo
a1d6c2f5c9
checkhealth: allow 'sudo install' of 'Neovim::Ext' #11874
cpanm cannot look for Perl modules from root directories
without sudo so it creates '~/perl5/' and look for Perl modules in there.
Whether this directory existed before running cpanm or not,
cpanm returns a warning to advice the user to setup local::lib
in order to use modules in '~/perl5/' and exits with error code 0.
Each line in the warning always starts with '!'.

Display this warning to the user.
Continue parsing the version number if the warning can be ignored
because lines that are not prefixed with '!' are valid output.

Fix #11858
2020-02-15 16:02:52 -08:00
Björn Linse
dc0e534a91
Merge pull request #11864 from h-michael/deepcopy
lua: vim.deepcopy() and vim.tbl_extend() should preserve vim.empty_dict()
2020-02-15 18:10:48 +01:00
Matthieu Coudron
bb331a9b31
mouse.c: can click on multibyte foldopen/foldclose (#11863)
would previously only work with ascii fillchars.

Added a test.
2020-02-14 16:42:00 +01:00
Björn Linse
61c98a1cf2
Merge pull request #11870 from QnJ1c2kNCg/master
clang analyzer: Dead assignment `ns_id` in nvim_buf_add_highlight
2020-02-14 16:00:49 +01:00
Hirokazu Hata
cdb729b746
lua: add vim.tbl_extend and vim.deepcopy test 2020-02-14 22:36:21 +09:00
Hirokazu Hata
c230c7d1a6
lua: if second argument is vim.empty_dict(), vim.tbl_extend uses empty_dict() instead of {} 2020-02-14 19:35:46 +09:00
erw7
146598efcc
build: Fix MSVC build failure on CI #11865
clean-shared-libraries does nothing useful in MSVC build. Nevertheless,
it deletes ${DEPS_INSTALL_DIR}/lib/nvim/parser/c.dll and causes build
failure in CI.
2020-02-14 00:45:41 -08:00
Jan Edmund Lazo
1b200d9936
checkhealth: ignore cpamn "!" output #11869
cpanm outputs a warning that suggest to use 'sudo' or use local::lib.
cpanm exits with 0 so nvim thinks that the command worked.

cpanm output that starts with "!"  is likely an error.

Close #11858
2020-02-14 00:43:28 -08:00
Bruno Roy
a26943e9b3 clang bug: Dead assignment ns_id
Remove a dead assignment of the `ns_id` variable in the
`src/nvim/api/buffer.c` file.

Refer: https://neovim.io/doc/reports/clang/report-f279da.html#EndPath
2020-02-13 23:09:42 -08:00
Mathias Fußenegger
d9657b3ae2
doc/lsp: start_client config cmd must be a list (#11866)
doc/lsp: start_client config cmd must be a list

After the merge of https://github.com/neovim/neovim/pull/11847 cmd can
no longer be a string but must be a list.
2020-02-13 20:38:47 +01:00
Jakub Łuczyński
0eadbd4ac2 mark userfunc as legacy 2020-02-13 14:11:57 +01:00
Jakub Łuczyński
5e815edece rename: user_funcs -> userfunc
Lets stick with vim for now
2020-02-13 14:11:55 +01:00
Jakub Łuczyński
d50c1123d5 fix: includes 2020-02-13 14:11:53 +01:00
Jakub Łuczyński
e367e80e11 fix: moved macros 2020-02-13 14:11:52 +01:00
Jakub Łuczyński
c7ef0e8d2d fix: moved some static inline function 2020-02-13 14:11:50 +01:00
Jakub Łuczyński
3c413f1523 fix: vvlua_partial 2020-02-13 14:11:48 +01:00
Jakub Łuczyński
1e0a9b2690 fix: made eval_lavars_used global 2020-02-13 14:11:47 +01:00
Jakub Łuczyński
9d7ce03ef1 fix: include static function declarations 2020-02-13 14:11:45 +01:00
Jakub Łuczyński
3477512f81 fix: header updates 2020-02-13 14:11:44 +01:00
Jakub Łuczyński
937da5dd7e Removed redundant define 2020-02-13 14:11:42 +01:00
Jakub Łuczyński
423fcbee4a fix: factor out make_partial 2020-02-13 14:11:40 +01:00
Jakub Łuczyński
b683957763 fix: prof functions 2020-02-13 14:11:39 +01:00
Jakub Łuczyński
04f7e1f56d fix: var_set_global 2020-02-13 14:11:37 +01:00
Jakub Łuczyński
bae1738bce fix: find_var_ht_dict 2020-02-13 14:11:35 +01:00
Jakub Łuczyński
e50b545676 fix: factor out new functions
free_unref_funccal
get_funccal_local_var
get_funccal_args_var
get_current_funccal_dict
set_ref_in_previous_funccal
set_ref_in_call_stack
set_ref_in_func_args

note:
In vim semantic for garbage_collect was changed
(the result of free_unref_funccal is ignored, bug or intentional?)

For nvim I did leave previous behavior thus

did_free = did_free || free_unref_funccal(copyID, testing);
instead of just
free_unref_funccal(copyID, testing);
2020-02-13 14:11:34 +01:00
Jakub Łuczyński
c769b15fe4 fix: func_init 2020-02-13 14:11:32 +01:00
Jakub Łuczyński
700d7a037c unstatic some functions 2020-02-13 14:11:29 +01:00
Jakub Łuczyński
3b0475927c moved more stuff 2020-02-13 14:11:27 +01:00