Commit Graph

13972 Commits

Author SHA1 Message Date
Björn Linse
d3a7bdefb0 lua: immediate-callback safe print() 2019-08-05 13:19:44 +02:00
Justin M. Keyes
51440204e7
Merge #10695 from justinmk/test-fixes
test: various fixes
2019-08-05 10:17:37 +02:00
Justin M. Keyes
d4a0b6c4e1 test/man_spec: remove plugin_helpers.reset()
The call to plugin_helpers.reset() is redundant with the clear() call
above it.  Probably just a copy-paste mistake.

Avoids exit_event race #8813.

Helped-by: Björn Linse <bjorn.linse@gmail.com>
2019-08-05 04:51:49 +02:00
Justin M. Keyes
eec529cf9e test/mbyte_spec: skip broken test on QuickBuild
14:13:04,119 INFO  - # ./test/unit/helpers.lua @ 760: mbyte utf_char2bytes for chars 0xa000 - 0xafff
    14:13:06,307 WARN  - E908: using an invalid value as a String
      /usr/home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/.deps/usr/bin/luajit:
      ./test/unit/helpers.lua:459: write() error: 32: Broken pipe
    14:13:06,308 WARN  - stack traceback:
    14:13:06,308 WARN  - 	[C]: in function 'throw'
    14:13:06,308 WARN  - 	...quests-automated/.deps/usr/share/lua/5.1/busted/core.lua:149: in function 'error'
    14:13:06,308 WARN  - 	...ts-automated/.deps/usr/share/lua/5.1/luassert/assert.lua:171: in function 'assert'
    14:13:06,308 WARN  - 	./test/unit/helpers.lua:459: in function 'write'
    14:13:06,308 WARN  - 	./test/unit/helpers.lua:626: in function 'hook'
    14:13:06,308 WARN  - 	./test/unit/helpers.lua:574: in function <./test/unit/helpers.lua:557>
    14:13:06,308 WARN  - 	[C]: in function 'type'
    14:13:06,308 WARN  - 	...d/.deps/usr/share/lua/5.1/busted/outputHandlers/base.lua:57: in function 'copyElement'
    14:13:06,308 WARN  - 	...d/.deps/usr/share/lua/5.1/busted/outputHandlers/base.lua:66: in function 'format'
    14:13:06,308 WARN  - 	...d/.deps/usr/share/lua/5.1/busted/outputHandlers/base.lua:172: in function 'fn'
    14:13:06,308 WARN  - 	...-requests-automated/.deps/usr/share/lua/5.1/mediator.lua:103: in function 'publish'
    14:13:06,308 WARN  - 	...quests-automated/.deps/usr/share/lua/5.1/busted/core.lua:201: in function 'safe'
    14:13:06,308 WARN  - 	...quests-automated/.deps/usr/share/lua/5.1/busted/core.lua:312: in function 'execute'
    14:13:06,308 WARN  - 	...sts-automated/.deps/usr/share/lua/5.1/busted/execute.lua:58: in function 'execute'
    14:13:06,308 WARN  - 	...ests-automated/.deps/usr/share/lua/5.1/busted/runner.lua:197: in function <...ests-automated/.deps/usr/share/lua/5.1/busted/runner.lua:11>
    14:13:06,308 WARN  - 	./.deps/usr/lib/luarocks/rocks/busted/2.0.0-1/bin/busted:3: in main chunk
    14:13:06,308 WARN  - 	[C]: at 0x004041a0
    14:13:06,323 WARN  - Terminated
    14:13:06,325 INFO  - Executing post-execute action...
    14:13:06,526 INFO  - Checking step execute condition...
    14:13:06,526 INFO  - Step execute condition satisfied, executing...
    14:13:06,706 INFO  - Executing pre-execute action...
    14:13:06,706 INFO  - Running step...
2019-08-05 04:19:36 +02:00
Justin M. Keyes
94afc201bc test: isCI(): add "name" parameter 2019-08-05 04:02:41 +02:00
Justin M. Keyes
c516586dc3 tests: fix flaky "TermClose … fast-exiting terminal job stops"
This extra retry() was removed (at my suggestion) in 5b94a2977a, but
it is probably needed: jobwait(…, timeout=0) could return while
channel_process_exit_cb() is still queued (so TermClose event didn't
fire yet).

    20:46:21,288 INFO  - not ok 547 - TermClose event triggers when fast-exiting terminal job stops
    20:46:21,288 INFO  - # test/functional/autocmd/termclose_spec.lua @ 20
    20:46:21,288 INFO  - # Failure message: ./test/functional/helpers.lua:98: Vim:E121: Undefined variable: g:test_termclose
    20:46:21,288 INFO  - # stack traceback:
    20:46:21,288 INFO  - # 	./test/functional/helpers.lua:98: in function 'eval'
    20:46:21,288 INFO  - # 	test/functional/autocmd/termclose_spec.lua:25: in function <test/functional/autocmd/termclose_spec.lua:20>
2019-08-05 03:52:17 +02:00
Jan Edmund Lazo
6871445dfe vim-patch:8.1.1383: warning for size_t/int mixup (#10694)
Problem:    Warning for size_t/int mixup.
Solution:   Change type. (Mike Williams)
d33a764123
2019-08-05 03:35:46 +02:00
Justin M. Keyes
45c34bd84a
:doautocmd : Never show "No matching autocommands" #10689
The message is useless, it doesn't even mention the event name.

vim_dev discussion:
https://groups.google.com/forum/#!msg/vim_dev/RTbq58TMq9w/Xr4rSoUTCgAJ

ref: https://github.com/vim/vim/issues/4300
2019-08-05 03:33:45 +02:00
Jan Edmund Lazo
01ddb39699 vim-patch:8.1.1311: test: abort autocmd with exception #10692
Problem:    Aborting an autocmd with an exception is not tested.
Solution:   Add a test.  Also shows how to abort a command by throwing an
            exception.
23b5139234
2019-08-05 01:54:17 +02:00
Jan Edmund Lazo
a724209b5a vim-patch:8.1.1251: test completion of mapping keys #10691
Problem:    No test for completion of mapping keys.
Solution:   Add a test.  Also clean up the code.
2cb9f02532
2019-08-05 01:12:35 +02:00
Daniel Hahler
4c35e6fe67
Makefile: only use pattern rules with BUILD_TYPE=Ninja (#10687)
While not doing any harm with "Unix Makefiles", they do not work there
as-is.  Therefore just do not use them then.

Followup to #10366 (7f6ff829a).
2019-08-04 17:13:04 +02:00
Justin M. Keyes
05712d4b20 runtime/matchit.vim: workaround broken 'packpath'
fix #10680
2019-08-04 16:49:10 +02:00
Justin M. Keyes
96be8a2c4d
Merge #10161 from equalsraf/tb-clipboard-reload
Support "reload" of providers
2019-08-04 15:52:56 +02:00
Justin M. Keyes
2141dc2262 provider: check #Call() if g:loaded_xx_provider=2 2019-08-04 13:23:46 +02:00
Justin M. Keyes
e952b7fc2f health.vim: check has("debug") 2019-08-04 13:23:46 +02:00
Justin M. Keyes
5e6a08f2e6 provider: skip non-provider has() feature-names
We don't want to retry autoload sourcing (slow) for every random has()
query that finds it way to eval_call_provider().
2019-08-04 13:23:46 +02:00
Justin M. Keyes
241956720d provider: g:loaded_xx_provider=2 means "enabled and working"
Value of 1 cannot be used, because users might set that in their vimrc
to _disable_ a provider, which would confuse :checkhealth and has().
2019-08-04 13:23:46 +02:00
Justin M. Keyes
66938b928c provider: decide status by g:loaded_xx_provider 2019-08-04 13:23:46 +02:00
Rui Abreu Ferreira
2cfe4748e5 provider: let providers decide their status
Instead of deciding provider status in eval_has_provider, move the
decision to the provider Vim scripts.

Previously, provider loading worked as follows:

1. eval_has_provider() verified provider availability by searching for
   the provider#providername#Call function and cached this verificaion as a static
   variable for some providers
2. providers short-circuited on loading to prevent the definition of the
   Call function (with the exception of the node provider that did not)

This commit changes the expected interface between nvim and its
providers to facilitate provider reloading, by splitting the
verification of the provider from the availability of the Call function.

eval_has_provider() now checks for a provider#providername#enabled
variable. It is up to the provider script to set this to 0 or 1
accordingly. eval_call_provider() remains unchanged.

All providers hosting a Call function were updated to respect this.

The clipboard provider now has a Reload function to reload the
provider.
2019-08-04 13:23:46 +02:00
Jan Edmund Lazo
2860453c4f doc: update 'shellredir' advice for powershell #10686
Encoding can be utf8, unicode, utf32.
User can choose to omit '-Encoding' to default to 'unicode'.

'ascii' encoding corrupts the following file:
https://www.w3.org/2001/06/utf-8-test/UTF-8-demo.html

Inspect 'foo.txt' with the following code after downloading the file.

Get-Content -Encoding UTF8 UTF-8-demo.html | Out-File -Encoding ascii foo.txt
2019-08-04 11:32:17 +02:00
Justin M. Keyes
0bb1008e7f
Merge #10683 from janlazo/vim-8.1.1796
vim-patch:8.1.{1237,1796}
2019-08-03 19:14:47 +02:00
Jan Edmund Lazo
5dd860fd73 vim-patch:8.1.1237: error for using "compl", reserved word in C++
Problem:    Error for using "compl", reserved word in C++.
Solution:   Rename to "complp". (suggestion by Ken Takata)
52111f8231
2019-08-03 12:38:50 -04:00
Jan Edmund Lazo
01b2dac727 vim-patch:8.1.1796: :argdo is not tested
Problem:    :argdo is not tested
Solution:   Add a test.
72e1b39111
2019-08-03 11:38:52 -04:00
Daniel Hahler
a49cf51269
build: require unibilium>=2.0 (#10681)
* build: require unibilium>=2.0

This also ports FindUnibilium to LibFindMacros, which was planned
anyway, and makes the version check easier.

With an older Unibilium our fallback code in `terminfo_from_builtin`
will not work (because it assumes the new data structures from 2.0.0 [1]),
and nvim would crash later because of `ut` being NUL.

1: 42f3cdd284
2019-08-03 15:20:28 +02:00
Daniel Hahler
ae27406db2
ci: Travis: move gcc-functionaltest-lua to 2nd stage (#10682)
Ref: https://github.com/neovim/neovim/pull/10673#issuecomment-517733843
2019-08-03 14:55:27 +02:00
Justin M. Keyes
7e8dbb5958
Merge #10678 from janlazo/vim-8.1.1187
vim-patch:8.1.{1187,1761,1762,1775}
2019-08-03 13:59:41 +02:00
Jan Edmund Lazo
620a906406 vim-patch:8.1.1775: error message may be empty in filetype test
Problem:    Error message may be empty in filetype test.
Solution:   Use v:exception instead. (Daniel Hahler, closs vim/vim#4744)
eee9f65b2a
2019-08-02 19:51:04 -04:00
Jan Edmund Lazo
12fe0cf5f9 vim-patch:8.1.1762: some filetype rules are in the wrong place
Problem:    Some filetype rules are in the wrong place.
Solution:   Move to the right place.  Add a few more tests.
c273405188
2019-08-02 19:48:32 -04:00
Jan Edmund Lazo
d827a750f7 vim-patch:8.1.1761: filetype "vuejs" causes problems for some users
Problem:    Filetype "vuejs" causes problems for some users.
Solution:   Rename to "vue".
4248111497
2019-08-02 19:46:34 -04:00
Jan Edmund Lazo
cdd8540a20 vim-patch:8.1.1187: cannot recognize Pipfile
Problem:    Cannot recognize Pipfile.
Solution:   Use existing filetypes. (Charles Ross, closes vim/vim#4280)
3a4c53ba51
2019-08-02 19:44:37 -04:00
Daniel Hahler
24fb7eefaa
terminfo_start: use unibi_from_term, skip without TERM (#10670)
This is clearer/more explicit and avoids potential mismatch between what unibilium thinks vs what Nvim thinks.

For reference: e3b16d6219/uniutil.c (L203-L211)
2019-08-02 19:39:29 +02:00
Justin M. Keyes
a270c33b3a
Merge #10675 from justinmk/vim-runtime
fix #10572
2019-08-02 19:22:23 +02:00
Justin M. Keyes
e2e220256e runtime/optwin.vim: missing 'previewpopup' feature
test_options.vim fails, so we need to disable this until the feature is
implemented.
2019-08-02 16:41:18 +02:00
Justin M. Keyes
df636003bf doc: remove "{not available ...}" noise 2019-08-02 16:36:42 +02:00
Justin M. Keyes
9bc4f275b3 vim-patch:5477506a9f01
Update runtime files.
5477506a9f

NA:
vim-patch:2a9c9f6d89f1 "undo extra changes in src/Makefile"
2a9c9f6d89
2019-08-02 16:20:23 +02:00
Justin M. Keyes
7c19a4e518 vim-patch:85850f3a5ef9
Update runtime files
85850f3a5e
2019-08-02 16:20:22 +02:00
Justin M. Keyes
1e4e890a76 vim-patch:396e829fa355
Update runtime files
396e829fa3
2019-08-02 16:20:22 +02:00
Justin M. Keyes
0d852bdc69 vim-patch:6c1e1570b134
Update runtime files
6c1e1570b1
2019-08-02 16:20:22 +02:00
Justin M. Keyes
bd23fefb39 vim-patch:12ee7ff00b91
Update runtime files
12ee7ff00b
2019-08-02 16:20:22 +02:00
Justin M. Keyes
ad9b781bba vim-patch:773a97c254d0
Update runtime files - Add typescript syntax and indent.
773a97c254
2019-08-02 16:20:22 +02:00
Justin M. Keyes
0414a33868 vim-patch:61da1bfa6c6b
Update runtime files.
61da1bfa6c
2019-08-02 16:20:22 +02:00
Justin M. Keyes
c6e4a29ad2 vim-patch:7dd64a3e57d2
Update runtime files.
7dd64a3e57
2019-08-02 16:20:22 +02:00
Justin M. Keyes
4ea8323667 vim-patch:68e6560b84f1
Update runtime files.
68e6560b84
2019-08-02 16:20:22 +02:00
Justin M. Keyes
bf6919f26b cleanup 2019-08-02 16:20:22 +02:00
Daniel Hahler
1aedb9ed00
ci: Travis: move coverage job to first stage (#10673)
This swaps it with "gcc-32bit".
It is better to have the "coverage" job run than "gcc-32bit" in case of
flaky build failures - especially on master, since otherwise no base
coverage is available for future PRs.
2019-08-02 15:48:32 +02:00
Justin M. Keyes
7cf0119c68
Merge #10666 from justinmk/vim-runtime
vim-patch: runtime updates
2019-08-02 15:10:04 +02:00
Justin M. Keyes
b92a5bc3c4
Merge #10664 from janlazo/vim-8.1.1780
vim-patch:8.1.{1374,1780}
2019-08-02 06:01:46 +02:00
Justin M. Keyes
532ee54a42 vim-patch:a6c27c47ddf0
Update runtime files
a6c27c47dd
2019-08-01 23:27:26 +02:00
Justin M. Keyes
f379eac1ef vim-patch:911ead126903
Update runtime files
911ead1269

NA: vim-patch:602abeb20fb7
2019-08-01 23:12:33 +02:00
Justin M. Keyes
4d830ca31b vim-patch:62e1bb4a111e
Update runtime files.
62e1bb4a11

NA: vim-patch:496555fd1821
2019-08-01 22:58:20 +02:00