Björn Linse
d3a7bdefb0
lua: immediate-callback safe print()
2019-08-05 13:19:44 +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
Justin M. Keyes
2141dc2262
provider: check #Call() if g:loaded_xx_provider=2
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
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
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
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
1f6c9fd822
stream: log unwritten bytes, if any #10663
2019-08-01 15:26:22 +02:00
Daniel Hahler
41bb68b8e8
process_stop: uv: do not close stdin first/explicitly #10584
...
- process_stop: do not close stdin explicitly. The "close stdin" step was from
aa9cb48
, before we fixed/reworked the SIGTERM timing logic. So it's probably
outdated / no longer needed.
- win: jobstop: exit_code 15
GetExitCodeProcess appears to return the used signal.
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getexitcodeprocess
ref #10573
2019-08-01 13:55:06 +02:00
Jan Edmund Lazo
c708567262
fileio: port hotfix from patch 8.1.1379
...
Patch 8.1.1379 includes a change to a test, added in Patch 8.1.0815.
Patch 8.1.0815 includes runtime doc changes to Blob.
Neovim does not support Blobs yet.
2019-08-01 04:35:23 -04:00
Jan Edmund Lazo
7995a5e964
vim-patch:8.1.1374: check for file changed triggers too often
...
Problem: Check for file changed triggers too often.
Solution: Don't use "b_p_ar" when it is negative.
c97582b029
2019-08-01 04:29:39 -04:00
Jan Edmund Lazo
28946c285b
lint
2019-08-01 04:20:35 -04:00
Jan Edmund Lazo
309296545c
vim-patch:8.1.1780: warning for file no longer available is repeated
...
Problem: Warning for file no longer available is repeated every time Vim is
focused. (Brian Armstrong)
Solution: Only give the message once. (closes vim/vim#4748 )
674e2bde6e
2019-07-31 21:49:36 -04:00
Justin M. Keyes
65578693b2
Merge #10654 from ngortheone/clang/npd_helptags_one
...
clang/"null pointer dereference": ex_cmds.c
2019-07-31 07:22:12 +02:00
Ihor Antonov
6fc0a9f557
lint: helptags_one
2019-07-30 16:58:28 -04:00
Daniel Hahler
6e01ed6a4c
vim-patch:8.1.0572: stopping a job does not work properly on OpenBSD
...
Problem: Stopping a job does not work properly on OpenBSD.
Solution: Do not use getpgid() to check the process group of the job
processs ID, always pass the negative process ID to kill().
(George Koehler, closes vim/vim#3656 )
76ab4fd619
Ref: https://github.com/neovim/neovim/issues/9704
Ref: https://github.com/neovim/neovim/issues/10182#issuecomment-514450069
Closes https://github.com/neovim/neovim/pull/10660
2019-07-30 18:41:38 +02:00
Daniel Hahler
da87b67812
tests: runnvim.vim: do not call jobstop() ( #10659 )
...
It should be done for timeouts only (-1, not != -1), but the job is
stopped via `:bwipeout!` already also in that case.
Fixes E900 with timing out tests:
"test_xxx.tlog" "test_xxx.tlog" [New] 183L, 13375C written
Error detected while processing function Main:
line 37:
E900: Invalid channel id================================================================================
2019-07-30 15:08:05 +02:00
Daniel Hahler
b117754a8b
gen_eval.lua: use correct name in usage
2019-07-30 10:37:41 +02:00
Daniel Hahler
08ed3d6523
tests: use Vim's version for patch 8.1.0005
...
Not sure what happened in daca22f5b
/ #8821 , but Vim used assert_match /
no expand in vim/vim@d19b23415 (8.1.0005) already.
2019-07-30 10:35:44 +02:00
Ihor Antonov
11ed7377f9
clang/"null pointer dereference": ex_cmds.c
2019-07-29 22:56:59 -04:00
Daniel Hahler
d7b04ae7a7
py: flake8 fixes
2019-07-29 22:14:23 +02:00
Justin M. Keyes
bae02eb396
Merge #10645 from janlazo/vim-8.1.0999
...
vim-patch:8.1.{1005,1041,1049,1052,1053,1086,1394}
2019-07-29 20:59:38 +02:00
Justin M. Keyes
6e03f87e09
Merge #10615 'vim-patch:8.1.0053'
...
fix #10604
2019-07-29 20:43:44 +02:00
Ihor Antonov
454902d663
PVS/V507: suppress false positive #10647
...
The pointer does not outlive the value in local scope as it gets
reassigned immediately after scope.
2019-07-29 19:57:16 +02:00
cangscop
ea14d8d493
vim-patch:8.1.0053 use typval_T in the caller of call_vim_function
...
Problem: unreliable types for complete function arguments
Solution: fix argument type for functions w/ unreliable type conversion(Ozaki Kiichi)
vim/vim#2993
2019-07-29 19:56:02 +02:00
Gavin D. Howard
696334181f
build/macOS: enable fallthrough attribute #10653
2019-07-29 19:51:49 +02:00
Jan Edmund Lazo
d6b31721bf
vim-patch:8.1.1086: too many curly braces
...
Problem: Too many curly braces.
Solution: Remove curly braces where they are not needed. (Hirohito Higashi,
closes vim/vim#3982 )
abab0b0fdd
Neovim code style requires the opposite.
Add curly braces to minimize lint errors when applying Vim patches.
2019-07-28 23:44:36 -04:00
Jan Edmund Lazo
b388f46266
buffer: add attributes to pure functions
2019-07-28 22:19:11 -04:00
Jan Edmund Lazo
01e3690ca8
vim-patch:8.1.1049: when user tries to exit with CTRL-C message is confusing
...
Problem: When user tries to exit with CTRL-C message is confusing.
Solution: Only mention ":qa!" when there is a changed buffer. (closes vim/vim#4163 )
a84a3dd663
vim-patch:8.1.1052: test for CTRL-C message sometimes fails
Problem: test for CTRL-C message sometimes fails
Solution: Make sure there are no changed buffers.
553e5a5c56
vim-patch:8.1.1053: warning for missing return statement
Problem: Warning for missing return statement. (Dominique Pelle)
Solution: Add return statement.
d6c3f1fa2b
2019-07-28 22:19:11 -04:00
Jan Edmund Lazo
4c50f0dc76
vim-patch:8.1.1041: test for Arabic no longer needed
...
Problem: Test for Arabic no longer needed.
Solution: Remove the test for something that was intentionally left out.
295e3ba31f
2019-07-28 22:05:51 -04:00
Jan Edmund Lazo
00e882e6f6
vim-patch:8.1.1394: not restoring t_F2 in registers test
...
Problem: Not restoring t_F2 in registers test.
Solution: Assign to &t_F2 instead of t_F2. (Andy Massimino, closes vim/vim#4434 )
a5e44600eb
2019-07-28 22:05:51 -04:00
Jan Edmund Lazo
c53e78e125
vim-patch:8.1.1005: test fails because t_F2 is not set
...
Problem: Test fails because t_F2 is not set.
Solution: Add try-catch.
55d81cd2a1
2019-07-28 22:05:51 -04:00
Ihor Antonov
1c74c7c446
lint: makemap
...
* if braces
* spaces
* post increments
* comment style
2019-07-28 21:10:49 -04:00
Ihor Antonov
ed5f891e83
pvs/V560: part of conditional expression is always false
...
makemap: same condition is used to skip outer loop cycle
2019-07-28 20:48:44 -04:00
Justin M. Keyes
caa8c06bae
vim-patch:8.1.1138: add CompleteChanged #10644
...
(This was originally a Neovim patch, but this commit merges some changes
from the Vim patch.)
d7f246c68c
2019-07-29 02:36:46 +02:00
erw7
505f47403b
vim-patch:8.1.0017: shell command completion has duplicates #10616
...
Problem: Shell command completion has duplicates. (Yegappan Lakshmanan)
Solution: Use a hash table to avoid duplicates. (Ozaki Kiichi, closes vim/vim#539 , closes vim/vim#2733 )
62fe66f251
2019-07-29 01:25:54 +02:00
Bartosz Miera
16727dcf1e
clang/"dead assignments" #10620
...
Also revert possibly-wrong change in f_sign_getplaced() from
652be3cb00
.
2019-07-29 00:52:24 +02:00
Jit
7cc2b723d4
TextYankPost: spurious/too-early dispatch during delete #10392
...
Problem: delete-with-register dispatches TextYankPost before updating yank registers
Solution: Add flag to op_yank().
Fixes #10225
2019-07-29 00:50:11 +02:00
Justin M. Keyes
4213492231
Merge #10643 from janlazo/vim-8.1.1765
...
vim-patch:8.1.{990,992,1765}
2019-07-29 00:34:47 +02:00