Commit Graph

14577 Commits

Author SHA1 Message Date
Daniel Hahler
db9f68f98d
ci: AppVeyor: coverage for Lua (Windows) (#10426) 2019-10-09 03:07:42 +02:00
Daniel Hahler
7e4b744b64
ci: OpenBSD: enable functionaltest (#11178) 2019-10-08 17:36:58 +02:00
Justin M. Keyes
3b3a409781 Merge #11077 'vim-patch:8.1.{1354,1356,1362,1588}' 2019-10-07 21:51:04 -07:00
Daniel Hahler
7faa6c41c8
cmake: only set LUA_PRG with successful check (#11172)
This is relevant for when using `USE_BUNDLED_LUAJIT=ON` with
`USE_BUNDLED_LUAROCKS=OFF`, and then building without the necessary modules
being installed/activated there yet: it would check the other (system) "lua"
interpreters also, and in case all failed keep the `LUA_PRG` in the cache for
the last failed entry - making it not re-check the previous ones on the next
build (after you might have activated your custom LuaRocks installation).

Only setting LUA_PRG if the check was successful handles the case better where
it is configured already - we should not try to re-configure it then.
2019-10-07 17:42:40 +02:00
Jurica Bradaric
0586a4b512 vim-patch:8.1.1588: in :let-heredoc line continuation is recognized
Problem:    In :let-heredoc line continuation is recognized.
Solution:   Do not consume line continuation. (Ozaki Kiichi, closes vim/vim#4580)
e96a2498f9
2019-10-07 14:14:13 +02:00
Jurica Bradaric
c84b39150f vim-patch:8.1.1362: code and data in tests can be hard to read
Problem:    Code and data in tests can be hard to read.
Solution:   Use the new heredoc style. (Yegappan Lakshmanan, closes vim/vim#4400)
c79745a82f
2019-10-07 14:14:13 +02:00
Jurica Bradaric
b5ac11139e vim-patch:8.1.1356: some text in heredoc assignment ends the text
Problem:    Some text in heredoc assignment ends the text. (Ozaki Kiichi)
Solution:   Recognize "let v =<<" and skip until the end.
8471e57026
2019-10-07 14:14:13 +02:00
Jurica Bradaric
b1ada8ec21 vim-patch:8.1.1354: getting a list of text lines is clumsy
Problem:    Getting a list of text lines is clumsy.
Solution:   Add the =<< assignment. (Yegappan Lakshmanan, closes vim/vim#4386)
f5842c5a53
2019-10-07 14:14:13 +02:00
Daniel Hahler
dfed0e60d7
Merge pull request #11154 from blueyed/bump-tree-sitter
ci: upgrade tree-sitter from 0.15.2 to 0.15.9
2019-10-07 13:34:23 +02:00
Daniel Hahler
6ea49d8c76
ci: use cluacov for better performance (#11152) 2019-10-07 13:01:14 +02:00
Justin M. Keyes
23ba875b82
Merge #11170 from janlazo/vim-8.1.2120
vim-patch:8.1.2120
2019-10-06 18:52:38 -07:00
Jan Edmund Lazo
97cdfdcde2
Remove dead code 2019-10-06 21:22:02 -04:00
Jan Edmund Lazo
09232958ff
vim-patch:8.1.2120: some MB_ macros are more complicated than necessary
Problem:    Some MB_ macros are more complicated than necessary. (Dominique
            Pelle)
Solution:   Simplify the macros.  Expand inline.
1614a14901
2019-10-06 21:11:38 -04:00
Daniel Hahler
8f20c50caa
ci: submit_coverage: run luacov actually (#11169)
Apparently this got lost with #11127 / 77a551b65.
2019-10-07 00:44:54 +02:00
Daniel Hahler
c8fe2a8d23
test/old: add test_fnamemodify.vim (#11168)
Moved to a new-style test in vim/vim@610cc1b9b (v7.4.1652).

Ref: https://github.com/neovim/neovim/pull/11165#issuecomment-538785588
2019-10-06 23:35:52 +02:00
Daniel Hahler
e9b420dba5 lint 2019-10-06 22:55:24 +02:00
Daniel Hahler
7a3602378f ci: upgrade tree-sitter from 0.15.2 to 0.15.9
tree-sitter-c is still at 0.15.2 though.
2019-10-06 22:55:11 +02:00
Daniel Hahler
2b08dd8f06
tests: retry: "wait() evaluates the condition on given interval" (#11155)
Ref: https://github.com/neovim/neovim/issues/11137
2019-10-06 22:47:40 +02:00
Daniel Hahler
e452988960
tests/functional: keep $TMPDIR in env (#11163) 2019-10-06 22:26:54 +02:00
Justin M. Keyes
93bceac9bd
Merge #11157 from janlazo/vim-8.1.2113
vim-patch:8.1.{59, 586, 2113}
2019-10-06 12:32:27 -07:00
Jan Edmund Lazo
d1abd6513e
vim-patch:8.1.0586: :digraph output is not easy to read
Problem:    :digraph output is not easy to read.
Solution:   Add highlighting for :digraphs. (Marcin Szamotulski, closes vim/vim#3572)
            Also add section headers for :digraphs!.
eae8ae1b2b
2019-10-06 09:43:39 -04:00
Jan Edmund Lazo
b007e5d882
vim-patch:8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Problem:    Displayed digraph for "ga" wrong with 'encoding' "cp1251".
Solution:   Convert from 'encoding' to "utf-8" if needed. (closes vim/vim#3015)
bc5020aa4d
2019-10-06 09:34:47 -04:00
Vikram Pal
55007180a3 doc: Fix TEST_FILTER example #11158 2019-10-06 02:21:06 -07:00
Jurica Bradarić
fe074611cd vim-patch:8.1.1371: cannot recover from a swap file #11081
Problem:    Cannot recover from a swap file.
Solution:   Do not expand environment variables in the swap file name.
            Do not check the extension when we already know a file is a swap
            file.  (Ken Takata, closes 4415, closes vim/vim#4369)
99499b1c05
2019-10-05 20:35:48 -07:00
Marvim the Paranoid Android
1396cc9abb version.c: update [ci skip] #10981
vim-patch:8.0.0934: change to struts.h missing in patch
vim-patch:8.0.1176: job_start() does not handle quote and backslash correctly
vim-patch:8.0.1492: memory leak in balloon_split()
vim-patch:8.0.1582: in the MS-Windows console mouse movement is not used
vim-patch:8.0.1619: Win32 GUI: crash when winpty is not installed
vim-patch:8.0.1624: options for term_dumpdiff() and term_dumpload() not implemented
vim-patch:8.0.1665: when running a terminal from the GUI 'term' is not useful
vim-patch:8.0.1666: % argument in ch_log() causes trouble
vim-patch:8.0.1685: can't set ANSI colors of a terminal window
vim-patch:8.0.1711: term_setsize() is not implemented yet
vim-patch:8.0.1722: cannot specify a minimal size for a terminal window
vim-patch:8.0.1725: terminal debugger doesn't handle command arguments
vim-patch:8.0.1742: cannot get a list of all the jobs
vim-patch:8.0.1798: MS-Windows: file considered read-only too often
vim-patch:8.0.1835: print document name does not support multi-byte

vim-patch:8.1.0080: can't see the breakpoint number in the terminal debugger
vim-patch:8.1.0156: MS-Windows compiler warning
vim-patch:8.1.0226: too many #ifdefs
vim-patch:8.1.0722: cannot build without the virtualedit feature
vim-patch:8.1.0745: compiler warnings for signed/unsigned string
vim-patch:8.1.0752: one more compiler warning for signed/unsigned string
vim-patch:8.1.2025: MS-Windows: Including shlguid.h causes problems for msys2
vim-patch:8.1.2027: MS-Windows: problem with ambiwidth characters
vim-patch:8.1.2033: cannot build with tiny features
vim-patch:8.1.2049: cannot build tiny version
vim-patch:8.1.2061: MS-Windows GUI: ":sh" crashes when trying to use a terminal
vim-patch:8.1.2075: get many log messages when waiting for a typed character
vim-patch:8.1.2078: build error with +textprop but without +terminal
vim-patch:8.1.2084: Amiga: cannot get the user name
vim-patch:8.1.2086: missing a few changes for the renamed files
vim-patch:8.1.2088: renamed libvterm mouse.c file not in distributed file list
vim-patch:8.1.2090: not clear why channel log file ends
vim-patch:8.1.2101: write_session_file() often defined but not used
vim-patch:8.1.2102: can't build with GTK and FEAT_GUI_GNOME
vim-patch:8.1.2112: build number for ConPTY is outdated

The following `if_pyth` patch seems to be N/A. In `~/.local/`, python 2 and 3 have their own subfolders in `~/.local/include/` and `~/.local/lib/`. `PYTHONUSERBASE` is enough to make the user modules work (on my machine) for the legacy tests.
vim-patch:8.0.1451: difficult to set the python home directories properly

The following patch requires `set compatible` and unsupported `cpoptions`:
vim-patch:8.1.1331: test 29 is old style
2019-10-05 20:13:47 -07:00
Jan Edmund Lazo
5581ffac74
vim-patch:8.1.2113: ":help expr-!~?" only works after searching
Problem:    ":help expr-!~?" only works after searching.
Solution:   Escape "~" after "expr-". (closes vim/vim#5015)
9ca250855b
2019-10-05 11:17:30 -04:00
Daniel Hahler
402afb0895
Makefile: use $TMPDIR below src/nvim/testdir (#11153)
This makes it ignored/cleaned automatically.
It was made absolute in 8821579ba, but to the root back then.
2019-10-04 22:10:16 +02:00
erw7
b4ea09cc06 Fix potential deadlock #11151
ELOG may call os_getenv and os_setenv internally. In that case, a
deadlock occurs.
2019-10-04 08:18:24 -07:00
Daniel Hahler
77a551b657
ci: coverage for Lua (no Windows, using luacov) (#11127) 2019-10-04 16:09:42 +02:00
Daniel Hahler
a341eb6087 win_line: update w_last_cursorline always
Vim patch 8.1.0856 (54d9ea6) caused a performance regression in Neovim,
when `set conceallevel=1 nocursorline` was used, since then due to
refactoring in 23c71d5 `w_last_cursorline` would never get updated
anymore.

Adds/uses `redrawdebug+=nodelta` for testing this.

Fixes https://github.com/neovim/neovim/issues/11100.
Closes https://github.com/neovim/neovim/pull/11101.
2019-10-04 08:48:57 +02:00
Daniel Hahler
cd73a0342a tests: tui_spec: improve/merge OptionSet/deferred
Closes https://github.com/neovim/neovim/pull/11129.
2019-10-04 08:39:16 +02:00
Daniel Hahler
382391bb2d
health: provider: skip checks with g:loaded_X_provider = 0 (#11147)
The Python provider was special (via [1]), and would continue to do
checks with `0` being set explicitly even.
This was fixed in #11044 (45447e3b6), ref: #11040.

This extends it to use the same method with all providers.

1: https://github.com/neovim/neovim/pull/8047
2019-10-04 08:16:30 +02:00
Daniel Hahler
c3ae5e1375 test/old: align with Vim #11096 2019-10-03 00:32:14 -07:00
Zach Wegner
8d68a37c5a refactor: wrap common plines() usage in plines_win_full() #11141 2019-10-02 23:06:05 -07:00
Daniel Hahler
f96d1e6bc4
tui: fix handling of bg response after suspend (#11145)
`tui_terminal_after_startup` gets called right after resuming from
suspending (via `Ctrl-z`) already (not delayed as with the startup
itself), and would set `waiting_for_bg_response` to false then directly.
This results in the terminal response not being processed then anymore,
and leaking into Neovim itself.

This changes it to try 5 times always, which means that it typically
would stop after a few characters of input from the user typically, e.g.
with tmux, which does not send a reply.

While it might be better to have something based on the time (e.g. only
wait for max 1s), this appears to be easier to do.

Fixes regression in 8a4ae3d.
2019-10-03 08:04:24 +02:00
Justin M. Keyes
30479417e8
Merge #11087 from janlazo/vim-8.1.0010
vim-patch:8.1.{10,230,315,330,514,517,518,1327,1347,1758,2072,2074,2091,2095,2103}
2019-10-02 22:43:59 -07:00
Daniel Hahler
b069e9b20f tests: unit: NVIM_TEST_TRACE_LEVEL: default to 0 #11144
Traces are not useful normally (unless debugging/fixing tests), but only add
overhead.  Disable them by default.
2019-10-02 22:41:57 -07:00
Daniel Hahler
3d3c783fea
ci: Travis: simplify 32bit build (#11093)
- `CMAKE_SYSTEM_LIBRARY_PATH` should not be used, and is a
  semicolon-separated list anyway [1]

1: https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_LIBRARY_PATH.html
2019-10-03 05:40:25 +02:00
Jan Edmund Lazo
4518f230fa
vim-patch:8.1.0330: the qf_add_entries() function is too long
Problem:    The qf_add_entries() function is too long.
Solution:   Split in two parts. (Yegappan Lakshmanan)
6f6ef7c195
2019-10-02 00:52:22 -04:00
Daniel Hahler
0c1be45ea0
shell: improve displaying of pulse (#11130)
- output "[...]" to indicate throttling is being used, instead of just
  an empty line
- go to beginning of line after displaying the pulse, so that following
  output is displayed over it
2019-10-02 06:26:57 +02:00
Daniel Hahler
333dc3d138
Fix flaky test: tui_spec: increase timeout (#11134)
Meant to fix:

    [  ERROR   ] test/functional/terminal/tui_spec.lua @ 925: TUI FocusGained/FocusLost in terminal-mode
    test/functional/ui/screen.lua:587: Row 6 did not match.
    Expected:
      |{1:r}eady $                                           |
      |[Process exited 0]                                |
      |                                                  |
      |                                                  |
      |                                                  |
      |*gained                                            |
      |{3:-- TERMINAL --}                                    |
    Actual:
      |{1:r}eady $                                           |
      |[Process exited 0]                                |
      |                                                  |
      |                                                  |
      |                                                  |
      |*:terminal                                         |
      |{3:-- TERMINAL --}                                    |

    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.

    stack traceback:
    	test/functional/ui/screen.lua:587: in function '_wait'
    	test/functional/ui/screen.lua:370: in function 'expect'
    	test/functional/terminal/tui_spec.lua:934: in function <test/functional/terminal/tui_spec.lua:925>

I've thought about adding this, but it might not be really relevant, and
slows down the tests a bit (and a warning "warning: Screen test
succeeded immediately" with another test):

```diff
diff --git i/test/functional/terminal/tui_spec.lua w/test/functional/terminal/tui_spec.lua
index ada073c4e..4bc2ab4e0 100644
--- i/test/functional/terminal/tui_spec.lua
+++ w/test/functional/terminal/tui_spec.lua
@@ -818,6 +818,11 @@ describe('TUI FocusGained/FocusLost', function()
       ..'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile noshowcmd noruler"]')
     feed_data(":autocmd FocusGained * echo 'gained'\n")
     feed_data(":autocmd FocusLost * echo 'lost'\n")
+    -- Wait for autocommand to be registered.
+    retry(nil, nil, function()
+      feed_data(":autocmd FocusLost\n")
+      screen:expect{any="         echo 'lost'"}
+    end)
     feed_data("\034\016")  -- CTRL-\ CTRL-N
   end)
```
2019-10-02 04:56:22 +02:00
Jan Edmund Lazo
ada2ec4416
vim-patch:8.1.0315: helpgrep with language doesn't work properly
Problem:    Helpgrep with language doesn't work properly. (Takuya Fujiwara)
Solution:   Check for the language earlier. (Hirohito Higashi)
c631f2df62
2019-10-01 22:27:45 -04:00
Jan Edmund Lazo
efef797126
vim-patch:8.1.2103: wrong error message if "termdebugger" is not executable
Problem:    wrong error message if "termdebugger" is not executable.
Solution:   Check if "termdebugger" is executable and give a clear error
            message. (Ozaki Kiichi, closes vim/vim#5000)  Fix indents.
18223a592e
2019-10-01 22:27:45 -04:00
Jan Edmund Lazo
655085204e
vim-patch:8.1.0230: directly checking 'buftype' value
Problem:    Directly checking 'buftype' value.
Solution:   Add the bt_normal() function. (Yegappan Lakshmanan)
91335e5a67
2019-10-01 22:27:45 -04:00
Jan Edmund Lazo
8b67c8f8c6
vim-patch:8.1.2095: leaking memory when getting item from dict
Problem:    Leaking memory when getting item from dict.
Solution:   Also free the key when not evaluating.
a893194d91
2019-10-01 22:27:44 -04:00
Jan Edmund Lazo
74947203af
vim-patch:8.1.2091: double free when memory allocation fails
Problem:    Double free when memory allocation fails. (Zu-Ming Jiang)
Solution:   Use VIM_CLEAR() instead of vim_free(). (closes vim/vim#4991)
0f1c6708fd
2019-10-01 22:27:44 -04:00
Jan Edmund Lazo
56c860ac4a
quickfix: fix pvs/v547 errors 2019-10-01 22:27:44 -04:00
Jan Edmund Lazo
8732cce315
vim-patch:8.1.2074: test for SafeState autocommand is a bit flaky
Problem:    Test for SafeState autocommand is a bit flaky.
Solution:   Add to list of flaky tests.
0d0c3ca007
2019-10-01 22:27:44 -04:00
Jan Edmund Lazo
1f4c9da9c6
test: fix screen assertions 2019-10-01 22:27:44 -04:00
Jan Edmund Lazo
90c2abc53f
vim-patch:8.1.1347: fractional scroll position not restored after closing window
Problem:    Fractional scroll position not restored after closing window.
Solution:   Do restore fraction if topline is not one.
bd2d68c2f4
2019-10-01 22:27:44 -04:00