Commit Graph

14470 Commits

Author SHA1 Message Date
John Szakmeister
b52ae0e8ba build: add support for building for FreeBSD under Sourcehut [skip ci] 2019-09-25 19:55:49 -04:00
Daniel Hahler
db6b4b677d
tests: busted: nvim handler: display durations always (#11075)
This shows them also with test failures/errors, where it is useful to
see how long the test took (for flaky failures running into timeout).
2019-09-25 02:20:32 +02:00
Daniel Hahler
81b19df5f2
cmake/GetCompileFlags: include CMAKE_C_COMPILER_ARG1 (#11091)
This is used internally (e.g. on Travis) for 32-bit builds (`-m32`).
2019-09-25 00:09:23 +02:00
Daniel Hahler
0ab7da8561
timer_spec: fix/harden flaky tests (#11080)
Those are flaky when using luacov (which causes reproducible slowness).

E.g.:

    [  ERROR   ] test/functional\eval\timer_spec.lua @ 105: timers can invoke redraw in blocking getchar() call
    test\functional\ui\screen.lua:587: Row 3 did not match.
    Expected:
      |ITEM 1                                  |
      |ITEM 2                                  |
      |*{1:~                                       }|
      |{1:~                                       }|
      |{1:~                                       }|
      |^                                        |
    Actual:
      |ITEM 1                                  |
      |ITEM 2                                  |
      |*ITEM 3                                  |
      |{1:~                                       }|
      |{1:~                                       }|
      |^                                        |
2019-09-24 08:55:27 +02:00
Daniel Hahler
2476a97ced
tui_spec: improve "TUI paste: exactly 64 bytes" (#11086)
Doing the screen test first might give insights about a possible
(flaky?) failure, where it looks like "feed_data" is processed out of
order:

    [  ERROR   ] test/functional/terminal/tui_spec.lua @ 561: TUI paste: exactly 64 bytes #10311
    test/functional/helpers.lua:388:
    retry() attempts: 490
    test/functional/terminal/tui_spec.lua:66: Expected objects to be the same.
    Passed in:
    (table: 0x44042de8) {
     *[1] = ' endzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' }
    Expected:
    (table: 0x41d6e568) {
     *[1] = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz end' }
    stack traceback:
            test/functional/helpers.lua:388: in function 'retry'
            test/functional/terminal/tui_spec.lua:63: in function 'expect_child_buf_lines'
            test/functional/terminal/tui_spec.lua:569: in function <test/functional/terminal/tui_spec.lua:561>

Ref: https://github.com/neovim/neovim/pull/11083#issuecomment-534375201
Build log: https://travis-ci.org/neovim/neovim/jobs/588749739#L5597
2019-09-24 08:35:29 +02:00
Daniel Hahler
445f2f4096
tui: flush ui buffer in tui_terminal_after_startup (#11083)
This avoids having a dummy event to tickle the main loop.

Confirmed using `nvim -u NONE -c 'au FocusGained * q'` in tmux (with
`:set -g focus-events on`): without the flushing it would only exit
after pressing a key.

Moves the flushing done recently in 3626d2107.
`nvim -u NONE -cq` is still working (i.e. consuming the response for the
terminal background query itself), and the flickering mentioned in
3626d2107 is reduced again.

Reverts part of bfb21f3e0 (#7729).
2019-09-24 08:34:00 +02:00
Jan Edmund Lazo
6d213593ed vim-patch:8.0.1754: ex_helpgrep() is too long #11084
Problem:    ex_helpgrep() is too long.
Solution:   Refactor the function. (Yegappan Lakshmanan, closes vim/vim#2766)
2225ebb486
2019-09-23 22:28:04 -07:00
Jan Edmund Lazo
d9032308fb vim-patch:8.0.1812: refactor qf_jump_to_usable_window() #11078
Problem:    The qf_jump_to_usable_window() function is too long.
Solution:   Split it in parts. (Yegappan Lakshmanan, closes vim/vim#2891)
7a2b0e55e9
2019-09-22 18:56:31 -07:00
Daniel Hahler
3626d2107e terminfo_start: flush buffer #11074
This aligns with `terminfo_stop`, which also flushes the buffer
after disabling things.

This ensures Neovim gets the response to the terminal background query
before exiting (`nvim -u NONE -cq` with e.g. urxvt or kitty).

Caveats:
* With kitty this causes some "flickering", likely since the alternate
  screen is being setup with `nvim -u NONE -cq`, whereas it would not be
  processed otherwise before quitting (as with the background query).
* tmux after this patch may print ^[[I (CSI I / FocusGained) after
  `nvim -u NONE -cq`.

Fixes https://github.com/neovim/neovim/issues/11062
2019-09-22 12:51:55 -07:00
Justin M. Keyes
fb26c38434
Merge #11076 from blueyed/fix-fold-patches
Fix fold patches: vim-patch:8.1.2052, vim-patch:8.1.2059
fix #11002
2019-09-22 12:32:46 -07:00
Daniel Hahler
6c3d34e4df vim-patch:8.1.2059: fix for "x" deleting a fold has side effects
Problem:    Fix for "x" deleting a fold has side effects.
Solution:   Fix it where the fold is included.
56ebbabea1
2019-09-22 20:11:04 +02:00
Daniel Hahler
97b82553e0 vim-patch:8.1.2052: using "x" before a closed fold may delete that fold
Problem:    Using "x" before a closed fold may delete that fold.
Solution:   Do not translate 'x' do "dl". (Christian Brabandt, closes vim/vim#4927)
7a9bd7c1e0
2019-09-22 20:11:04 +02:00
Daniel Hahler
6807779c68
tests: make 'win_update redraws lines properly' more readable (#11068) 2019-09-22 14:58:38 +02:00
Daniel Hahler
ed11721b6b
tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073) 2019-09-22 14:57:44 +02:00
Björn Linse
bb90e41ee2
Merge pull request #11049 from bfredl/rulermsg
screen: missing redraw/highlight for ruler in message area
2019-09-22 12:14:07 +02:00
Björn Linse
f316916758 screen: missing redraw/highlight for ruler in message area 2019-09-22 09:38:52 +02:00
erw7
028d76e5d5 env: use putenv_s for LC_ALL, LANG, etc. #11050
Problem:  ":lang messages en_US.UTF-8" no longer overrides the language
          detected from the environment (at startup).
Solution: In os_setenv, special-case "LC_ALL", "LANG", et al. to use
          putenv_s instead of uv_os_setenv.

fixes #11045
2019-09-22 00:02:28 -07:00
Justin M. Keyes
c534ab8447
Merge #11034 from zwegner/precedes
Fix "precedes" listchar behavior in wrap mode
2019-09-21 23:48:08 -07:00
Justin M. Keyes
1654932498 vim-patch:8.1.2060: "precedes" in 'listchars' not used properly
(Credit: Zach Wegner, https://github.com/neovim/neovim/pull/11034)

Problem:    "precedes" in 'listchars' not used properly.
Solution:   Correctly handle the "precedes" char in list mode for long lines.
bffba7f704
2019-09-21 22:13:55 -07:00
Zach Wegner
18e5869f56 Fix "precedes" listchar behavior in wrap mode
Previously, the "precedes" character would be rendered on every row
when w_skipcol > 0 (i.e., when viewing a single line longer than the
entire screen), instead of just on the first row. Make sure to only
render it on the first row in this case.

Add a test for this behavior.

Fix documentation for the "precedes" character, which erroneously
stated that it was only active when wrap mode was off.
2019-09-21 22:09:52 -07:00
Yoshio S
45447e3b64 checkhealth: skip python checks if intentionally disabled #11044
close #11040
2019-09-21 16:17:22 -07:00
Daniel Hahler
ad0f97f412 vim-patch:8.1.2055: profile: adjust line format #11058
Problem:    Not easy to jump to function line from profile.
Solution:   Use "file:99" instead of "file line 99" so that "gf" works.
            (Daniel Hahler, closes vim/vim#4951)
181d4f58cc
2019-09-21 14:18:56 -07:00
Justin M. Keyes
fd82ce4a3a
Merge #11060 from janlazo/vim-8.1.1783
vim-patch:8.0.{1109,1529,1539,1621,1733,1771,1776},8.1.{1783,2054,2058}
2019-09-21 14:07:50 -07:00
Jan Edmund Lazo
b3e56957f8 vim-patch:8.1.0460: assert_fails() message argument #11051
Problem:    assert_fails() does not take a message argument
Solution:   Add the argument.
1307d1c003
2019-09-21 14:03:46 -07:00
Jan Edmund Lazo
111d34849a
vim-patch:8.0.1621: using invalid default value for highlight attribute
Problem:    Using invalid default value for highlight attribute.
Solution:   Use zero instead of -1.
6185903e3d
2019-09-21 11:07:59 -04:00
Jan Edmund Lazo
eb3888a322
vim-patch:8.0.1529: assert_equalfile() does not close file descriptors
Problem:    Assert_equalfile() does not close file descriptors. (Coverity)
Solution:   Close the file descriptors.
3049418f3d
2019-09-21 08:43:08 -04:00
Jan Edmund Lazo
2a7ffc6567
vim-patch:8.0.1776: in tests, when WaitFor() fails it doesn't say why
Problem:    In tests, when WaitFor() fails it doesn't say why.
Solution:   Turn a few more WaitFor() into WaitForAssert().
0e9d1ae321
2019-09-21 08:43:07 -04:00
Jan Edmund Lazo
3878b0822e
vim-patch:8.0.1771: in tests, when WaitFor() fails it doesn't say why
Problem:    In tests, when WaitFor() fails it doesn't say why. (James McCoy)
Solution:   Add WaitForAssert(), which produces an assert error when it fails.
50182fa84e
2019-09-21 08:43:07 -04:00
Jan Edmund Lazo
7cffc87868
vim-patch:8.0.1733: incomplete testing for completion fix
Problem:    Incomplete testing for completion fix. (Lifepillar)
Solution:   Add a test with CTRL-P.
bad0ce7b26
2019-09-21 08:43:07 -04:00
Jan Edmund Lazo
ca11662515
vim-patch:8.0.1539: no test for the popup menu positioning
Problem:    No test for the popup menu positioning.
Solution:   Add a screendump test for the popup menu.
6bb2cdfe60
2019-09-21 08:43:07 -04:00
Jan Edmund Lazo
b853b6e4ea
vim-patch:8.0.1109: timer causes error on exit from Ex mode
Problem:    Timer causes error on exit from Ex mode. (xtal8)
Solution:   save and restore the ex_pressedreturn flag. (Christian Brabandt,
            closes vim/vim#2079)
f5291f301e
2019-09-21 08:43:07 -04:00
Jan Edmund Lazo
42a0513095
vim-patch:8.1.2058: function for ex command is named inconsistently
Problem:    Function for ex command is named inconsistently.
Solution:   Rename do_marks() to ex_marks().
4bd782339e
2019-09-21 08:43:06 -04:00
Jan Edmund Lazo
1c71a3c657
vim-patch:8.1.2054: compiler test for Perl may fail
Problem:    Compiler test for Perl may fail.
Solution:   Accept any error line number. (James McCoy, closes vim/vim#4944)
cebfcffa40
2019-09-21 08:43:06 -04:00
Jan Edmund Lazo
690cd4f012
vim-patch:8.1.1783: MS-Windows: compiler test may fail when using %:S
Problem:    MS-Windows: compiler test may fail when using %:S.
Solution:   Reset 'shellslash'.
dff2adc8dd
2019-09-21 08:43:06 -04:00
Björn Linse
d6f658e38f
Merge pull request #11069 from bfredl/virtualcol
screen: fix vcol counting with virtual text.
2019-09-21 10:40:41 +02:00
Björn Linse
828a6e7568 screen: fix vcol counting with virtual text. Fixes #9941 2019-09-21 09:39:10 +02:00
Daniel Hahler
afd576ee94
Merge pull request #11057 from blueyed/test-indent
Vim patches for indent tests
2019-09-19 00:12:45 +02:00
Daniel Hahler
660b452440 vim-patch:8.1.2056: "make test" for indent files doesn't cause make to fail
Problem:    "make test" for indent files doesn't cause make to fail.
Solution:   Exit the script with ":cquit". (Daniel Hahler, closes vim/vim#4949)
cd67059c0c
2019-09-18 22:59:13 +02:00
Daniel Hahler
0e75a9eead Update runtime/indent/testdir to latest Vim runtime
Several runtime updates ignored the non-existing files.
2019-09-18 22:59:13 +02:00
Daniel Hahler
48b2d21d5e vim-patch:8.1.1213: "make clean" in top dir does not cleanup indent test output
Problem:    "make clean" in top dir does not cleanup indent test output.
Solution:   Clean the indent test output.  Do not rely on the vim executable
            for that. (closes vim/vim#4307)
e13a3901ca
2019-09-18 22:46:47 +02:00
Daniel Hahler
10c050caf9 vim-patch:8.1.0599: without the +eval feature the indent tests don't work
Problem:    Without the +eval feature the indent tests don't work.
Solution:   Skip the body of the tests.
eeed665b0e
2019-09-18 22:38:37 +02:00
Daniel Hahler
865aaa031a vim-patch:8.1.0576: indent script tests pick up installed scripts
Problem:    Indent script tests pick up installed scripts.
Solution:   Use current runtime indent scripts.
30700cd5ff
2019-09-18 22:38:15 +02:00
Daniel Hahler
b466f0e114 vim-patch:8.1.0545: when executing indent tests user preferences interfere
Problem:    When executing indent tests user preferences interfere.
Solution:   Add "--clean".
dc2f73a698
2019-09-18 22:37:54 +02:00
Daniel Hahler
7f59f5b104 vim-patch:8.1.0496: no tests for indent files
Problem:    No tests for indent files.
Solution:   Add a mechanism for running indent file tests.  Add a first test
            for Vim indenting.
c0fe4978f2
2019-09-18 22:37:25 +02:00
Daniel Hahler
1070c092c7
win_update: fix redraw regression (#11027)
Before 6e9ea5adc `win_ins_lines` would return `FAIL` for `i/line_count == 0`.

Handle this by checking it in the outer `if`.

Ref: https://github.com/neovim/neovim/commit/6e9ea5ad#commitcomment-35084669
2019-09-18 18:22:38 +02:00
Daniel Hahler
d478542110
health#provider: fix duplicated output/stderr (#11048)
Ref: https://github.com/neovim/neovim/pull/11047#issuecomment-532268826
2019-09-18 18:21:44 +02:00
Justin M. Keyes
618045685b
Merge #11035 from janlazo/vim-8.0.1523
vim-patch:8.0.{1523,1770}
2019-09-17 21:49:45 -07:00
Jan Edmund Lazo
8db9e82e3e
vim-patch:8.0.1770: assert functions don't return anything
Problem:    Assert functions don't return anything.
Solution:   Return non-zero when the assertion fails.
65a5464985
2019-09-16 23:42:44 -04:00
Jan Edmund Lazo
792c290343
vim-patch:8.0.1523: cannot write and read terminal screendumps
Problem:    Cannot write and read terminal screendumps.
Solution:   Add term_dumpwrite(), term_dumpread() and term_dumpdiff().
            Also add assert_equalfile().
d96ff16511
2019-09-16 21:36:46 -04:00
Daniel Hahler
0b71bb73e8
tests: improve error message with literat "~" directory (#11032) 2019-09-17 00:39:33 +02:00