Commit Graph

13729 Commits

Author SHA1 Message Date
Justin M. Keyes
af01b347d8
Merge #10606 'vim-patch:8.1.0404' 2019-07-27 01:33:58 +02:00
Daniel Hahler
e1a5c29b93
ci: Travis: remove clang-tsan from allowed failures [skip ci] (#10591)
While it still might be flaky sometimes, it is far better than the
osx jobs in general, and due to it being allowed to fail, we are not
getting aware of more recent (flaky) issues due to building tags during
make-install, which might indicate a more generic problem.
2019-07-27 01:32:02 +02:00
Daniel Hahler
809613c952
Merge pull request #10580 from blueyed/tests-cat
tests: use "cat" also on Windows
2019-07-27 00:59:27 +02:00
erw7
53d1801b49 tests: win: fix "cat" with PowerShell
Ref: https://github.com/neovim/neovim/pull/10580#issuecomment-514884092
2019-07-26 21:45:24 +02:00
Daniel Hahler
2906c702f9 tests: use "cat" also on Windows
Fixes https://github.com/neovim/neovim/issues/10574.

Keeps 'can be called recursively' pending for now, see
https://github.com/neovim/neovim/pull/10580#issuecomment-515295571.
2019-07-26 21:45:00 +02:00
Jan Edmund Lazo
2b731a388a vim-patch:8.1.1747: unused variables #10605
Problem:    Compiler warning for unused variables. (Tony Mechelynck)
Solution:   Add #ifdef.
fbfb757d4c
2019-07-26 11:21:44 +02:00
Jan Edmund Lazo
0fb05b2c7d Revert "vim-patch:8.1.0430: Xargadd file left behind after running test"
This reverts commit ce1b4f95fe.
2019-07-26 05:19:05 -04:00
Jan Edmund Lazo
cbda383efe vim-patch:8.1.0404: accessing invalid memory with long argument name
Problem:    Accessing invalid memory with long argument name.
Solution:   Use item_count instead of checking for a terminating NULL.
            (Dominique Pelle, closes vim/vim#3444)
e961cba3cb
2019-07-26 05:19:05 -04:00
Justin M. Keyes
b42bfa599b
Merge #10589 'os/fs: introduce os_fopen()' 2019-07-26 11:18:19 +02:00
Justin M. Keyes
2731080212 cleanup: remove mch_fopen in favor of os_fopen 2019-07-25 22:32:23 +02:00
Justin M. Keyes
bb3a0099c6 os/fs: introduce os_fopen()
Windows: Using fopen() directly may need UTF-16 filepath conversion. To
achieve that, os_fopen() goes through os_open().

fix #10586
2019-07-25 22:32:23 +02:00
Ihor Antonov
8a9c9a9963 PVS/V768: do use enum as bool #10582
Fix win_draw_end invocation, pass HLF symbol explicitly.
2019-07-25 21:57:58 +02:00
Justin M. Keyes
36622014c6 Merge #10596 'vim-patch:8.1.{899,903,905,907,908,910,913,1746}'
close #9930
close #10051
2019-07-25 12:00:08 +02:00
Jan Edmund Lazo
0925afcfcf regexp: add function attributes 2019-07-25 03:34:26 -04:00
Jan Edmund Lazo
98fcf66b7a vim-patch:8.1.0913: CI crashes when running out of memory
Problem:    CI crashes when running out of memory.
Solution:   Apply 'maxmempattern' also to new regexp engine.
688b3983d8
2019-07-25 03:02:22 -04:00
Jan Edmund Lazo
52488ea6fb vim-patch:8.1.0910: crash with tricky search pattern
Problem:    Crash with tricky search pattern. (Kuang-che Wu)
Solution:   Check for runnning out of memory. (closes vim/vim#3950)
15bbd6ec87
2019-07-25 02:39:24 -04:00
Jan Edmund Lazo
fb059a1741 vim-patch:8.1.0907: CI tests on AppVeyor are failing
Problem:    CI tests on AppVeyor are failing.
Solution:   Reduce the recursiveness limit for regexp.
5382f12c91
2019-07-25 02:21:32 -04:00
Jan Edmund Lazo
a77e5b3606 vim-patch:8.1.0905: complicated regexp causes a crash
Problem:    Complicated regexp causes a crash. (Kuang-che Wu)
Solution:   Limit the recursiveness of addstate(). (closes vim/vim#3941)
5567ad48b6
2019-07-25 02:04:32 -04:00
Jan Edmund Lazo
8e490b98cc regexp: use fixed types to avoid overflow 2019-07-24 21:50:16 -04:00
Gabriel
33ce6a7f62 Checks for overflow when parsing string to int 2019-07-24 21:43:04 -04:00
Jan Edmund Lazo
43f4e5d5be vim-patch:8.1.0908: can't handle large value for %{nr}v in regexp
Problem:    Can't handle large value for %{nr}v in regexp. (Kuang-che Wu)
Solution:   Give an error if the value is too large. (closes vim/vim#3948)
9403a2168d
2019-07-24 21:43:04 -04:00
Jan Edmund Lazo
9ea449085d vim-patch:8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Problem:    ":dl" is seen as ":dlist" instead of ":delete".
Solution:   Do not use cmdidxs2[] if the length is 1. (closes vim/vim#4721)
94f82cbacf
2019-07-24 21:43:04 -04:00
Jan Edmund Lazo
80487b59c9 vim-patch:8.1.0903: struct uses more bytes than needed
Problem:    Struct uses more bytes than needed.
Solution:   Reorder members of regitem_S. (Dominique Pelle, closes vim/vim#3936)
beb7574d6b
2019-07-24 19:46:09 -04:00
Jan Edmund Lazo
2385039623 vim-patch:8.1.0899: no need to check restricted mode for setwinvar()
Problem:    No need to check restricted mode for setwinvar().
Solution:   Remove check_restricted().
e0fb7d1e38
2019-07-24 19:46:09 -04:00
Daniel Hahler
d1faf900b1
coverage: use "cd" with gcovr (#10594)
This makes the invocation compatible for the upcoming gcovr 4.2 release,
and is the correct way of invoking it.

Ref: https://github.com/gcovr/gcovr/commit/a782972#commitcomment-34420728
2019-07-25 01:11:17 +02:00
Daniel Hahler
b8fcf62da9
vim-patch:8.1.1740: exepath() doesn't work for "bin/cat" (#10556)
Problem:    Exepath() doesn't work for "bin/cat".
Solution:   Check for any path separator. (Daniel Hahler, closes vim/vim#4724,
            closes vim/vim#4710)
d08b8c4c04

Fixes https://github.com/neovim/neovim/issues/10554.
2019-07-24 22:23:00 +02:00
Daniel Hahler
3566267e75
vim-patch:8.1.1738: testing lambda with timer is slow (#10590)
Problem:    Testing lambda with timer is slow.
Solution:   Do not test timer accuracy, only that it works. (Daniel Hahler,
            closes vim/vim#4723)
9bc4dde45d
2019-07-24 19:47:41 +02:00
Daniel Hahler
8404e8df20
third-party: download: retry (#10599)
This is meant to handle the common case of failing to download
libtermkey:

    FAILED: cd /home/travis/build/neovim/neovim/deps-downloads/libtermkey && /usr/local/cmake-3.12.4/bin/cmake -DPREFIX=/home/travis/nvim-deps/build -DDOWNLOAD_DIR=/home/travis/build/neovim/neovim/deps-downloads/libtermkey -DURL=http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.21.1.tar.gz -DEXPECTED_SHA256=cecbf737f35d18f433c8d7864f63c0f878af41f8bd0255a3ebb16010dc044d5f -DTARGET=libtermkey -DUSE_EXISTING_SRC_DIR=OFF -P /home/travis/build/neovim/neovim/third-party/cmake/DownloadAndExtractFile.cmake && /usr/local/cmake-3.12.4/bin/cmake -E touch /home/travis/nvim-deps/build/src/libtermkey-stamp/libtermkey-download
    -- file: /home/travis/build/neovim/neovim/deps-downloads/libtermkey/libtermkey-0.21.1.tar.gz
    -- downloading...
         src='http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.21.1.tar.gz'
         dst='/home/travis/build/neovim/neovim/deps-downloads/libtermkey/libtermkey-0.21.1.tar.gz'
         timeout='none'
    CMake Error at /home/travis/build/neovim/neovim/third-party/cmake/DownloadAndExtractFile.cmake:77 (message):
      error: downloading
      'http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.21.1.tar.gz' failed
        status_code: 6
        status_string: "Couldn't resolve host name"
        log: Curl_ipv4_resolve_r failed for www.leonerd.org.uk
      Couldn't resolve host 'www.leonerd.org.uk'
      Closing connection 0

Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
2019-07-24 19:11:27 +02:00
Daniel Hahler
431cf56e2f
ci: RunTests: ensure that the logfile gets displayed (#10597)
This is meant to help with test failures where e.g. `busted` itself might
crash or get killed.

Ref: https://github.com/neovim/neovim/issues/10182#issuecomment-514450069
2019-07-24 18:12:55 +02:00
Jan Edmund Lazo
06547cdfc0 sign: REMOVE FEAT_SIGN_ICONS, dead code #10595 2019-07-24 12:17:53 +02:00
Daniel Hahler
451f6046b0
tests: AppVeyor: fix test/functional/ex_cmds/arg_spec.lua (#10598)
For unknown reasons it does not have the trailing space in `:args`
output there anymore:

    [  FAILED  ] test/functional\ex_cmds\arg_spec.lua @ 11: :argument does not restart :terminal buffer
    test/functional\ex_cmds\arg_spec.lua:25: Expected objects to be the same.
    Passed in:
    (string) '
    [term://.//4552:C:\Windows\system32\cmd.exe]'
    Expected:
    (string) '
    [term://.//4552:C:\Windows\system32\cmd.exe] '
    stack traceback:
            test/functional\ex_cmds\arg_spec.lua:25: in function <test/functional\ex_cmds\arg_spec.lua:11>

The test is not about that though, and this can be made less strict by
using `trim()`.  The new test in `test_arglist.vim` for no trailing
newline is OK, and contains trailing spaces.  So this is likely due to
the length of it exceeding the column width already.
2019-07-24 09:31:46 +02:00
Daniel Hahler
733e1a0e73 vim-patch:8.1.1737: :args command that outputs one line gives more prompt
Problem:    :args command that outputs one line gives more prompt.
Solution:   Only output line break if needed. (Daniel Hahler, closes vim/vim#4715)
949f1989cb

Closes https://github.com/neovim/neovim/pull/10147.
2019-07-24 06:14:12 +02:00
Daniel Hahler
e134cc9d4a vim-patch:8.0.1738: ":args" output is hard to read
Problem:    ":args" output is hard to read.
Solution:   Make columns with the names if the output is more than one line.
5d69da462f

vim-patch:8.0.1740: warning for signed-unsigned incompatibility

Problem:    Warning for signed-unsigned incompatibility.
Solution:   Change type from "char *" to "char_u *". (John Marriott)
405dadb63e

Removes ported legacy test that was re-added later.
Ref: https://github.com/neovim/neovim/pull/10147#issuecomment-512609513
2019-07-24 06:09:28 +02:00
Daniel Hahler
8fc93241d6
tests: fix/improve Screen:expect_unchanged (#10577)
Do not sleep before collecting initial state.

Ref: https://github.com/neovim/neovim/pull/10550#issuecomment-513670205
2019-07-24 02:50:24 +02:00
Daniel Hahler
b59a1f7b52
ci: restore accidentally removed config (#10592) 2019-07-24 02:16:09 +02:00
Daniel Hahler
f08d10a0df
tests: re-enable "tab drag in tabline to the left moves tab left" (#10588)
Ref: https://github.com/neovim/neovim/pull/4874
2019-07-24 02:12:19 +02:00
Justin M. Keyes
5cccfa7c5a
Merge #10558 from erw7/fix-text-overrides-line-number2
Windows: Fix text overrides line number
2019-07-23 19:20:07 +02:00
erw7
465a0a3c09 env: invalid pointer after os_setenv() #10558 2019-07-23 11:45:38 +02:00
erw7
f6e779d939 win/TUI: workaround libuv LF => CRLF conversion #10558
Replace cud1 with \x1b[B because \n is CRLF on Windows (due to libuv).

fix #9461
2019-07-23 11:45:38 +02:00
Jan Edmund Lazo
0d5f629208 Revert "vim-patch:8.0.1723: using one item array size declaration is misleading" (#10583)
This reverts commit 315076a26d.
2019-07-23 05:37:20 +02:00
Daniel Hahler
4aabe4a0d5
build: GetBinaryDeps: move include, fix doc (#10579) 2019-07-22 20:50:30 +02:00
Daniel Hahler
d7274f2417
shell-test: fix REP for count larger than uint8_t (#10581) 2019-07-22 20:49:45 +02:00
Ihor Antonov
324dc0dbc0 PVS/V1019: "readability" warning #10566 2019-07-22 19:45:59 +02:00
Daniel Hahler
1e2af5e39d
tests: make TERM=interix test pending (#10576)
Ref: https://github.com/neovim/neovim/issues/10179
Ref: https://github.com/neovim/neovim/pull/9494
2019-07-22 18:49:37 +02:00
ddcien
184b87ee31 build: fix gcc warnings #10568
gcc version 8.3.0 (Debian 8.3.0-6)

    ../src/nvim/ex_docmd.c: In function ‘commands_array’:
    ../src/nvim/ex_docmd.c:10192:36: warning: ‘%ld’ directive output may be truncated writing between 1 and 19 bytes into a region of size 10 [-Wformat-truncation=]
             snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def);
                                        ^~~
    ../src/nvim/ex_docmd.c:10192:37: note: format string is defined here
             snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def);
    ../src/nvim/ex_docmd.c:10192:36: note: directive argument in the range [0, 9223372036854775807]
             snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def);
                                        ^~~
    ../src/nvim/ex_docmd.c:10192:9: note: ‘snprintf’ output between 2 and 20 bytes into a destination of size 10
             snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../src/nvim/ex_docmd.c:10205:36: warning: ‘%ld’ directive output may be truncated writing between 1 and 19 bytes into a region of size 10 [-Wformat-truncation=]
             snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def);
                                        ^~~
    ../src/nvim/ex_docmd.c:10205:37: note: format string is defined here
             snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def);
    ../src/nvim/ex_docmd.c:10205:36: note: directive argument in the range [0, 9223372036854775807]
             snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def);
                                        ^~~
    ../src/nvim/ex_docmd.c:10205:9: note: ‘snprintf’ output between 2 and 20 bytes into a destination of size 10
             snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../src/nvim/spell.c: In function ‘did_set_spelllang’:
    ../src/nvim/spell.c:1631:61: warning: ‘%s’ directive output may be truncated writing up to 254 bytes into a region of size 84 [-Wformat-truncation=]
                    "autocmd VimEnter * call spellfile#LoadFile('%s')|set spell",
                                                                 ^~
    ../src/nvim/spell.c:2063:25:
             spell_load_lang(lang);
                             ~~~~                                 
    ../src/nvim/spell.c:1630:7: note: ‘snprintf’ output between 57 and 311 bytes into a destination of size 128
           snprintf(autocmd_buf, sizeof(autocmd_buf),
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    "autocmd VimEnter * call spellfile#LoadFile('%s')|set spell",
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    lang);
                    ~~~~~
    ../src/nvim/window.c: In function ‘win_rotate’:
    ../src/nvim/window.c:1780:22: warning: ‘wp2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       wp2->w_pos_changed = true;
                          ^
    ../src/nvim/window.c:1779:22: warning: ‘wp1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       wp1->w_pos_changed = true;
2019-07-22 12:38:14 +02:00
Jan Edmund Lazo
39549159fe vim-patch:8.1.0706: introduce :redrawtabline #10570
Problem:    Tabline is not always redrawn when something that is used in
            'tabline' changes.
Solution:   Add ":redrawtabline" so that a plugin can at least cause the
            redraw when needed.
e12bab3144
2019-07-22 12:25:07 +02:00
Daniel Hahler
f8684bf6b9 build: remove -Wno-array-bounds workaround #10484
Might not be necessary anymore, at least it is fine on gcc 9.1, and
since the bug is still open/unresolved, something else might have fixed
it.

Ref: 4b81f627c
Ref: #7083
2019-07-22 12:22:53 +02:00
Daniel Hahler
66149ecffe
test/helpers: improve pattern with module functions (#10421)
Benefits:

- less lines, especially less results when grepping
- makes it clearer what is exported
2019-07-22 01:13:11 +02:00
Jan Edmund Lazo
8d66b6091b vim-patch:8.1.1724: too much overhead checking for CTRL-C #10564
Problem:    Too much overhead checking for CTRL-C while processing text.
Solution:   Increase BREAKCHECK_SKIP.  Remove the difference for when built
            with the GUI. (suggested by Andy Massimino, closes vim/vim#4708)
b4fe0eb4b4
2019-07-21 23:30:56 +02:00
Justin M. Keyes
27fb8933f5
Merge #10561 from justinmk/os_can_exe
jobstart(), system(): use $PATHEXT-resolved exe
2019-07-21 22:58:39 +02:00