Commit Graph

14026 Commits

Author SHA1 Message Date
Jan Edmund Lazo
66528f2475 vim-patch:8.1.1852: timers test is flaky #10788
Problem:    Timers test is flaky.
Solution:   Accept a larger count.  Add test to list of flaky tests.
7e6feb9eeb
2019-08-16 10:11:03 +02:00
Justin M. Keyes
812ed53724
Merge #10783 from erw7/debug-job-spec
fix #10762 flaky 'jobstop() kills entire process tree #6530'
2019-08-16 10:10:10 +02:00
erw7
85edb33fd1 Change to output status on failure 2019-08-16 13:37:44 +09:00
erw7
e82fc20f23 windows: ok(#children >= 3 and #chidlen <= 5)
Depending on the version of Windows, conhost.exe may not be included in
the child process.
2019-08-16 13:34:53 +09:00
Daniel Hahler
ae60172106 windows: ok(#children >= 4 and #children <= 5) 2019-08-16 13:24:44 +09:00
Daniel Hahler
1852dfdf9a
Merge pull request #10784 from blueyed/improve-version-compile-flags
Improve compile options/definitions with sanitizer builds (for --version).
2019-08-15 22:06:56 +02:00
Daniel Hahler
abfc8b3257
emsg_multiline: log Vim errors (#10778) 2019-08-15 20:18:09 +02:00
Daniel Hahler
18fb4dcbf9 src/nvim/CMakeLists.txt: use compile options/definitions
This includes `-fsanitize=thread` etc in the output of `--version`.
2019-08-15 19:44:00 +02:00
Daniel Hahler
28219534eb get_compile_flags: also look at target properties 2019-08-15 19:42:46 +02:00
Justin M. Keyes
6261d2658f
Merge #10761 from justinmk/win-utf-libuv-align
utf8_to_utf16, utf16_to_utf8: align with libuv
2019-08-15 09:32:18 +02:00
Jan Edmund Lazo
eb9f3308bc CI/travis: git clone -q #10781
https://docs.travis-ci.com/user/customizing-the-build/#git-clone-quiet
2019-08-15 08:55:22 +02:00
Justin M. Keyes
975be7e5dc build/win: fix warnings
../src/nvim/os/fs.c: In function 'os_can_exe':
  ../src/nvim/os/fs.c:247:27: warning: passing argument 1 of 'is_executable_ext' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    247 |     if (is_executable_ext(name, abspath)) {
        |                           ^~~~
  In file included from ../src/nvim/os/fs.c:36:
  src/nvim/auto/os/fs.c.generated.h:7:38: note: expected 'char *' but argument is of type 'const char *'
      7 | static _Bool is_executable_ext(char *name, char **abspath) FUNC_ATTR_NONNULL_ARG(1);
        |                                ~~~~~~^~~~
  ../src/nvim/os/fs.c: In function 'os_resolve_shortcut':
  ../src/nvim/os/fs.c:1183:56: warning: conversion from 'size_t' {aka 'const long long unsigned int'} to 'int' may change value [-Wconversion]
   1183 |     const int conversion_result = utf8_to_utf16(fname, len, &p);
        |                                                        ^~~
  ../src/nvim/os/fs.c:1211:19: warning: declaration of 'conversion_result' shadows a previous local [-Wshadow]
   1211 |         const int conversion_result = utf16_to_utf8(wsz, -1, &rfname);
        |                   ^~~~~~~~~~~~~~~~~
  ../src/nvim/os/fs.c:1183:15: note: shadowed declaration is here
   1183 |     const int conversion_result = utf8_to_utf16(fname, len, &p);
        |               ^~~~~~~~~~~~~~~~~
2019-08-15 00:28:41 +02:00
Justin M. Keyes
c9a0875ea8 os/: remove redundant define 2019-08-15 00:28:41 +02:00
Justin M. Keyes
07cc72ad5d utf16_to_utf8: align with libuv
- take a size parameter
- return libuv error code
- handle error in caller only (avoid redundant messages)

53995a3825
4c945f4936
2019-08-15 00:28:41 +02:00
Justin M. Keyes
8727f7a6a4 utf8_to_utf16: align with libuv
- take a size parameter
- always NUL-terminate the result
- return libuv error code
- handle error in caller only (avoid redundant messages)

53995a3825
4c945f4936
2019-08-15 00:28:41 +02:00
Daniel Hahler
fc60d92795
tests: skip "API nvim_parse_expression" on MSVC_32 (#10773)
Only "API nvim_parse_expression works with &opt" is flaky, but easier to
skip all of "API nvim_parse_expression".

Ref: https://github.com/neovim/neovim/issues/10241
2019-08-14 23:57:45 +02:00
Björn Linse
7d92c391a1
Merge pull request #10774 from bfredl/miminal_fdc
api: nvim_win_open() style="minimal" should disable 'foldcolumn'
2019-08-14 23:54:08 +02:00
Daniel Hahler
9bf3fab60b
Merge pull request #10779 from blueyed/ci-homebrew-no-update
ci: fix Travis
2019-08-14 23:21:41 +02:00
Daniel Hahler
ae31de32ee build: TSan: add src/.tsan-suppressions
Uses runtime suppressions instead of a blacklist, which can only ignore
whole files/functions.

Ref: https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions
Ref: https://github.com/neovim/neovim/pull/10591#issuecomment-521248233
2019-08-14 23:17:53 +02:00
Daniel Hahler
7c0ae06664 ci: Travis: build.sh: use cat "-vet" for osx
Fixes:

    cat: illegal option -- A
    usage: cat [-benstuv] [file ...]

Broken in 5cc45bb41.

squash! ci: Travis: build.sh: use cat "-vET" for osx  [skip appveyor]

cat -vet
2019-08-14 23:17:42 +02:00
Björn Linse
48b43352b0 pyxversion: fix logic error #10759
Do not incorrectly prefer python2 if python3 is working.
fixes #10758
2019-08-14 22:36:43 +02:00
Daniel Hahler
ab842fb8b8 ci: Travis: homebrew: update=false [skip appveyor]
It is disabled by default, and the docs mention that it slows builds
down [1].  It took 165s in https://travis-ci.org/neovim/neovim/jobs/572000615.

1: https://docs.travis-ci.com/user/installing-dependencies/#installing-packages-on-macos
2019-08-14 22:16:34 +02:00
Ihor Antonov
ebcb9adcc4 clang/"null pointer dereference" #10776
assert(curbuf) in ins_compl_get_exp
2019-08-14 20:50:30 +02:00
Daniel Hahler
5cc45bb419
ci: Travis: check logs for TSan also (#10775)
Uses `cat -A` with early "*San" check:
This prints terminal escape sequences as-is (for debugging), and does
not cause (display) issues with the Travis log.

Ref: https://github.com/neovim/neovim/pull/10591#issuecomment-521248233
2019-08-14 18:27:08 +02:00
Björn Linse
0c952c1c8b
Merge pull request #10757 from bfredl/compfix
compositor: handle invalid screen positions after resize gracefully
2019-08-14 15:52:11 +02:00
Björn Linse
f9f238b21a api: nvim_win_open() style="minimal" should disable 'foldcolumn' 2019-08-14 14:49:27 +02:00
Björn Linse
ba0aaf012a compositor: handle invalid screen positions after resize gracefully
The screen resize logic needs to be refactored to be simpler and more
deterministic. Until then, we need to handle attempts to draw outside of the
screen size gracefully, just like the old vim code did.

fixes #9989
2019-08-14 13:11:20 +02:00
Justin M. Keyes
5ad67af3c1
Merge #10763 from justinmk/startup-guicursor
startup: handle 'guicursor' after user config
2019-08-14 11:28:39 +02:00
Daniel Hahler
2fafed6bb8 clipboard: handle/avoid SIGTERM with previous owner #10765
Fixes regression due to signal being reported with exit status.
ref #10573 939d9053bd
ref https://github.com/neovim/neovim/issues/7054#issuecomment-520282429
2019-08-14 09:58:52 +02:00
Daniel Hahler
8fda095b6d tests: fix/improve "jobwait returns -1 when timed out" #10767
There was a longer timeout for Windows already, but unlike stated in
51d42917f it is not a worst-case, but gets waited for always.

The test is only about "-1" on timeout, so reduce it to this.

Fixes:

    16:33:19,309 INFO  - not ok 627 - jobs jobwait with timeout argument will return -1 if the wait timed out
    16:33:19,309 INFO  - # test/functional/core/job_spec.lua @ 707
    16:33:19,309 INFO  - # Failure message: test/functional/core/job_spec.lua:714: Expected objects to be the same.
    16:33:19,309 INFO  - # Passed in:
    16:33:19,309 INFO  - # (table: 0x0db1a3f0) {
    16:33:19,309 INFO  - #   [1] = 'notification'
    16:33:19,309 INFO  - #   [2] = 'wait'
    16:33:19,309 INFO  - #  *[3] = {
    16:33:19,309 INFO  - #    *[1] = {
    16:33:19,309 INFO  - #      *[1] = -1
    16:33:19,309 INFO  - #       [2] = -1 } } }
    16:33:19,309 INFO  - # Expected:
    16:33:19,309 INFO  - # (table: 0x0db1a480) {
    16:33:19,309 INFO  - #   [1] = 'notification'
    16:33:19,309 INFO  - #   [2] = 'wait'
    16:33:19,309 INFO  - #  *[3] = {
    16:33:19,309 INFO  - #    *[1] = {
    16:33:19,309 INFO  - #      *[1] = 4
    16:33:19,309 INFO  - #       [2] = -1 } } }
    16:33:19,309 INFO  - # stack traceback:
    16:33:19,309 INFO  - # 	test/functional/core/job_spec.lua:714: in function <test/functional/core/job_spec.lua:707>
2019-08-14 09:08:25 +02:00
Daniel Hahler
7668f04392 tests: include timer_start in duration #10772
This should not make much of a difference, but increases the timeout
when `load_factor` is used slightly.
2019-08-14 08:59:06 +02:00
mg979
a690bf8116 mksession: use exists(':tcd'), not has('nvim') #10770
Since recent vim versions also support :tcd, check for the actual
availability of the command, rather than has('nvim').
2019-08-14 08:45:54 +02:00
Daniel Hahler
c285ebfa73
vim-patch:8.1.0456: running test hangs when the input file is being edited (#10764)
Problem:    Running test hangs when the input file is being edited.
Solution:   Use a SwapExists autocommand to ignore editing the test script.
d8f27b30d6
2019-08-14 01:56:59 +02:00
Daniel Hahler
f2377e3575
tests: use larger timeout with "timers can be stopped from the handler" (#10760)
Seen on quickbuild:

    23:01:01,289 INFO  - not ok 1172 - timers can be stopped from the handler
    23:01:01,289 INFO  - # test/functional/eval/timer_spec.lua @ 154
    23:01:01,289 INFO  - # Failure message: test/functional/eval/timer_spec.lua:166: Expected objects to be the same.
    23:01:01,289 INFO  - # Passed in:
    23:01:01,289 INFO  - # (number) 3
    23:01:01,289 INFO  - # Expected:
    23:01:01,289 INFO  - # (number) 0
    23:01:01,289 INFO  - # stack traceback:
    23:01:01,289 INFO  - # 	test/functional/eval/timer_spec.lua:166: in function <test/functional/eval/timer_spec.lua:154>

Log: http://neovim-qb.szakmeister.net/build/24288
Ref: https://github.com/neovim/neovim/pull/10364
2019-08-14 00:44:32 +02:00
Justin M. Keyes
02c52a18f5 style 2019-08-13 22:22:47 +02:00
Justin M. Keyes
cbfd18c85a startup: handle 'guicursor' after user config
If parse_shape_opt() is done before user config, the TUI may cause
unwanted changes to the terminal cursor which cannot later be undone
(see #4396).

fix #10750
2019-08-13 22:19:00 +02:00
Daniel Hahler
c649e18131
Merge pull request #10752 from blueyed/vim-8.0.1179 2019-08-13 22:16:41 +02:00
Daniel Hahler
db41d02e48 vim-patch:8.1.1842: test listed as flaky should no longer be flaky
Problem:    Test listed as flaky should no longer be flaky.
Solution:   Remove Test_popup_and_window_resize from the list of flaky tests.
            (Daniel Hahler, close vim/vim#4807)
9570aacdb8
2019-08-13 22:15:54 +02:00
Daniel Hahler
4e6c596431 vim-patch:8.0.1179: Test_popup_and_window_resize() does not always pass
Problem:    Test_popup_and_window_resize() does not always pass.
Solution:   Do not use $VIMPROG, pass the Vim executable in the vimcmd file.
            (Ozaki Kiichi, closes vim/vim#2186)
631820536e

vim-patch:8.0.1526: no test using a screen dump yet

Problem:    No test using a screen dump yet.
Solution:   Add a test for C syntax highlighting.  Add helper functions.
da65058a9c

NOTE: uses modified `GetVimProg()` (which is used with skipped tests only
(mostly because of `!has('terminal')`)).

Vim uses a 'vimcmd' file, while Nvim uses `$NVIM_TEST_ARGX` environment
variables.

Ref: https://github.com/vim/vim/pull/4806
2019-08-13 22:15:54 +02:00
Ihor Antonov
947bd293c9 clang/"null pointer dereference" #10755 2019-08-13 20:52:25 +02:00
Jan Edmund Lazo
5e1acd412b vim-patch:8.1.1843: might be freeing memory that was not allocated (#10756)
Problem:    Might be freeing memory that was not allocated.
Solution:   Have next_fenc() set the fenc_alloced flag. (closes vim/vim#4804)
f077db2423
2019-08-13 16:46:26 +02:00
Daniel Hahler
90e44ecf11
build: link libraries by full path (for luv.so) (#10661)
Use "luv" as imported library to work around "-lluv" being used due to
missing SONAME.

Fixes https://github.com/neovim/neovim/issues/10407.
Ref: https://gitlab.kitware.com/cmake/cmake/issues/19578
Ref: https://github.com/NixOS/nixpkgs/issues/64400#issuecomment-516557253
2019-08-12 18:22:02 +02:00
Daniel Hahler
a336a05e7e
testdir/test_popup.vim: sync/align with Vim (#10751) 2019-08-12 17:10:48 +02:00
Ghjuvan Lacambre
2037028b50 ex_getln.c: fix compute_cmdrow() not resetting lines_left (#10749)
Before this commit, when `inccomand` was set to `nosplit`, multi-line
substitutions collapsed the command-line.

This happened because when ex_getln.c:cursorcmd() computed a msg_row, it
was given a cmdline_row one line too high. This happened because
message.c:msg_puts_display() was supposed to decrement cmdline_row but
didn't, because of the `msg_no_more && lines_left == 0` check placed
just before the decrementation part in msg_puts_display's while loop.

Every time msg_puts_display writes a line, it decreases `lines_left` (a
variable used to know how many lines are left for prompts). Since
redrawcommandline() did not reset `lines_left` between calls to
msg_puts_display, every time a character was pressed, `lines_left` was
decremented. This meant that once the user pressed COLUMNS+ROWS numbers
of characters, `lines_left` would reach 0 and prevent msg_row from being
decremented.

It makes sense to fix setting `lines_left` to `cmdline_row` in
`compute_cmdrow` ; after all, computing where the command line row
should be placed is equivalent to computing how many `lines_left` of
output there are left.

Closes #8254.
2019-08-12 14:21:15 +02:00
Justin M. Keyes
ad4eb18e43 Merge #10098 'win: fix msg_puts_printf()' 2019-08-12 02:42:13 +02:00
Daniel Hahler
48dc6344d6
Merge pull request #10745 from blueyed/vim-8.1.1461
vim-patch:8.1.1461 / vim-patch:8.1.1462
2019-08-11 20:35:31 +02:00
Daniel Hahler
6b028ec5f2
ci: AppVeyor: branches: only: master (#10746)
Only build PRs for master, and not other branches on the main repo, e.g.
when reverting via GitHub's UI.
2019-08-11 20:30:27 +02:00
Daniel Hahler
ef1c100174 rebuild [skip travis] 2019-08-11 15:36:09 +02:00
erw7
6616d1d3e5 win/env: Vim-compat: Empty string deletes env var #10743
- Windows: `set FOO=` deletes environment variable FOO, and there is no
  way to set empty string expect by calling the API.
- Vim-compatible: `:let $FOO=""` deletes the environment variable.
- See also Test_WindowsHome().

ref: https://github.com/neovim/neovim/pull/10657#issuecomment-516368089
2019-08-11 15:32:07 +02:00
Daniel Hahler
2193e68837 vim-patch:8.1.1462: MS-Windows: using special character requires quoting
Problem:    MS-Windows: using special character requires quoting.
Solution:   Add quotes. (Ken Takata)
c974022c31
2019-08-11 13:24:17 +02:00