Commit Graph

13695 Commits

Author SHA1 Message Date
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
Justin M. Keyes
1fde79eedf os_can_exe: remove char_u 2019-07-21 20:51:37 +02:00
Justin M. Keyes
b08dc3ec19 win: jobstart(), system(): $PATHEXT-resolve exe
Windows: In order for jobstart(['foo']), system(['foo']) to find
"foo.cmd", we must replace "foo" with "foo.cmd" before sending `argv` to
process_spawn().

Rationale: jobstart([…]), system([…]) "executable" semantics should be
consistent with the VimL executable() function.

fix #9569
related: #10554
2019-07-21 20:51:37 +02:00
Justin M. Keyes
9d0f8224c9
Merge #10555 from janlazo/vim-8.1.1720
vim-patch:8.1.{856,1720}
2019-07-21 14:40:32 +02:00
Jan Edmund Lazo
a63b95b315 move: assert nonnull wp pointer 2019-07-20 19:51:32 -04:00
Jan Edmund Lazo
54d9ea61ab vim-patch:8.1.0856: when scrolling a window the cursorline is not always updated
Problem:    When scrolling a window other than the current one the cursorline
            highlighting is not always updated. (Jason Franklin)
Solution:   Call redraw_for_cursorline() after scrolling.  Only set
            w_last_cursorline when drawing the cursor line.  Reset the lines
            to be redrawn also when redrawing the whole window.
bbb5f8d4c2
2019-07-20 19:34:06 -04:00
Jan Edmund Lazo
526dbcafd1 vim-patch:8.1.1720: crash with very long %[] pattern
Problem:    Crash with very long %[] pattern. (Reza Mirzazade farkhani)
Solution:   Check for reg_toolong. (closes vim/vim#4703)
2a5b52758b
2019-07-20 17:28:45 -04:00
Jan Edmund Lazo
d20bbc8022 vim-patch:8.1.0789: session sets v:errmsg #10553
Problem:    Sourcing a session sets v:errmsg.
Solution:   Use "%argdel" instead of "argdel *". (Jason Franklin)
555de4e3b2
2019-07-20 19:06:17 +02:00
Justin M. Keyes
b764120ee7
test: shell-test.c: "REP" command: flush, wait 1ms #10552
Typically most shell output is the result of non-trivial work, so it
would not blast stdout instantaneously.  To more closely simulate that
typical scenario, change `shell-test REP` to wait 1 millisecond between
iterations.
2019-07-20 18:07:04 +02:00
Justin M. Keyes
02e7ef4978
Merge #10550 'screen.lua: expect_unchanged()' 2019-07-20 15:49:49 +02:00
Justin M. Keyes
d19d9e4d9e screen.lua: always print keyword-args snapshot 2019-07-20 14:25:07 +02:00
Justin M. Keyes
6b45e12d67 screen.lua: expect_unchanged(), get_snapshot()
Factor `get_snapshot()` out of `print_snapshot()`, so that callers can
get a table (for use with `expect()`) instead of the string form.

Try to use this to fix indeterminism in `searchhl_spec.lua`.
  - Since the screen state is collected by `screen:expect_unchanged()`,
    we don't need a deterministic initial state (which would then be
    hardcoded into the test). This allows us to check "did anything
    change in the last N ms?" rather than "did anything change compared
    to a hardcoded screen-state?"
  - This may end up fruitless, because `expect_unchanged()` depends on
    timing to wait for an initial "current state".
2019-07-20 14:25:07 +02:00
Jan Edmund Lazo
7935f6ce35 vim-patch:8.1.0754: preferred column when setting 'cursorcolumn' #10549
Problem:    Preferred column is lost when setting 'cursorcolumn'.
Solution:   Change option flag to P_RWINONLY. (Takayuki Kurosawa,
            closes vim/vim#3806)
177ab9e026
2019-07-20 14:12:56 +02:00
Justin M. Keyes
643ba06d4d
test: shell-test.c: flush stdout for REP #10548
fix #10534
2019-07-20 12:52:33 +02:00
Jan Edmund Lazo
7f66fdb54d [RFC]vim-patch:8.1.{749,1715} #10545
* vim-patch:8.1.1715: emoji characters are seen as word characters for spelling

Problem:    Emoji characters are seen as word characters for spelling. (Gautam
            Iyer)
Solution:   Exclude class 3 from word characters.
06e6377009

* vim-patch:8.1.0749: error message contains garbage

Problem:    Error message contains garbage. (Dominique Pelle)
Solution:   Use correct pointer to failed expression.
6acc79f5d4
2019-07-20 10:48:45 +02:00
Justin M. Keyes
f55c1e4233
reltimefloat(): allow negative result #10544
For "backwards" duration, reltimefloat() should return negative value
like its counterpart reltimestr().

ref bab24a88ab
ref 06af88cd72
ref #10521
fix #10452
2019-07-20 10:46:09 +02:00
Justin M. Keyes
afef973262
doc [ci skip] #10383
- test/README.md: document luassert `TableFormatLevel`
- CONTRIBUTING.md: absorb parts of the old "Development tips" wiki page
2019-07-19 21:32:04 +02:00
Björn Linse
d5f7099be2
Merge pull request #10541 from bfredl/conversion_getln
refactor: enable -Wconversion for ex_getln.c and use int for Rows/Columns
2019-07-19 20:15:03 +02:00
Ihor Antonov
7e4fd045f9 PVS/V1026: possible overflow in a loop #10529
* pvs/V1026: possible overflow in a loop
* refactor: char_u -> uint8_t
* lint
* remove unused if branch: enc_utf8 is always true
2019-07-19 19:41:57 +02:00
Justin M. Keyes
1745e59ac1
Merge #10543 'PVS/V560' 2019-07-19 19:39:46 +02:00
Ihor Antonov
f42bb50392 lint 2019-07-19 12:31:34 -04:00
Ihor Antonov
f1127a33f1 pvs/V560: A part of conditional expression is always true
wp->w_p_list is checked earlier in the same composite if condition
2019-07-19 11:06:40 -04:00
Ihor Antonov
91bbd07417 pvs/V560: A part of conditional expression is always true
c == '\000' is always true because of the if branch it is already in
2019-07-19 10:58:31 -04:00
Björn Linse
aa28e070e9 refactor: use int for Columns and Rows 2019-07-19 15:57:19 +02:00
Björn Linse
75928101f8 refactor: enable -Wconversion for ex_getln.c 2019-07-19 15:56:38 +02:00
Justin M. Keyes
a46fe2e615
option_defs.h: fix incorrect definition #10542 2019-07-19 15:17:31 +02:00
erw7
6614543316 test: Force $TEST_FILE to relative path [ci skip] #10535
- Always force TEST_PATH to a relative path.
- Eliminate rel_test_path. (The code simplification is worth the extra
  subdirectory below Xtest_tmpdir/.)
2019-07-19 13:51:18 +02:00
Jan Edmund Lazo
d4e93fedf1 vim-patch:8.1.0740: Tcl test fails (#10540)
Problem:    Tcl test fails.
Solution:   When the argument is empty don't give an error, instead rely on
            the error reporting higher up.
8309b0559d
2019-07-19 11:46:22 +02:00
Justin M. Keyes
281d422e71
Merge #10368 from janlazo/vim-8.0.1164
vim-patch:8.0.{755,1146,1164}
2019-07-19 00:39:50 +02:00
Justin M. Keyes
572ecdfeed
Merge #10052 from janlazo/vim-8.1.0729
vim-patch:8.1.{729,732}
2019-07-19 00:36:56 +02:00
Daniel Hahler
a04e0c8db2
Revert "Downgrade to clang-4.0 to avoid false-positive warnings from clang" [skip appveyor] (#10487)
This reverts commit 2cbac719c3.
2019-07-18 08:49:37 +02:00
Ihor Antonov
ba7ec994ae pvs/V1037: two case branches doing the same thing (#10527) 2019-07-18 03:12:45 +02:00
Ihor Antonov
9412dcb6ae PVS/V1037: suppress warning #10526
* Case branches are semantically different.
* Lint
2019-07-18 03:10:45 +02:00
Jan Edmund Lazo
fdfdc0a228 vim-patch:8.1.0732: cannot build without the eval feature
Problem:    Cannot build without the eval feature.
Solution:   Make a copy of the sourced file name.
ea56e167c8
2019-07-17 20:27:08 -04:00
Jan Edmund Lazo
aa681df25f vim-patch:8.1.0729: there is a SourcePre autocommand event but not a SourcePost
Problem:    There is a SourcePre autocommand event but not a SourcePost.
Solution:   Add the SourcePost autocommand event. (closes vim/vim#3739)
2b6185287a
2019-07-17 20:23:05 -04:00