Commit Graph

20465 Commits

Author SHA1 Message Date
Sean Dewar
f68d25737f
Merge pull request #17020 from seandewar/vim-8.1.2342
vim-patch:8.1.{2342,2343,2356,2357},8.2.0233: `rand` and `srand`
2022-02-05 15:30:09 +00:00
James McCoy
ef6cedf820
Merge pull request #17290 from dundargoc/ci/simplify-ci-process
ci: simplify CI process
2022-02-05 09:16:41 -05:00
Sean Dewar
4f7a8991a9
vim-patch:8.2.0233: crash when using garbagecollect() in between rand()
Problem:    Crash when using garbagecollect() in between rand().
Solution:   Redesign the rand() and srand() implementation. (Yasuhiro
            Matsumoto, closes vim/vim#5587, closes vim/vim#5588)
4f645c54ef

Omit test_srand_seed.
Unmacroify SHUFFLE_XOSHIRO128STARSTAR and SPLITMIX32 while we're at it (leave
ROTL alone as it's fairly innocent).
2022-02-05 14:01:00 +00:00
Sean Dewar
cc7ccf6d31
vim-patch:8.1.2357: no test with wrong argument for rand()
Problem:    No test with wrong argument for rand().
Solution:   Add a test case.
68e9e5f7fc
2022-02-05 14:00:59 +00:00
Sean Dewar
c97614d98f
vim-patch:8.1.2356: rand() does not use the best algorithm
Problem:    rand() does not use the best algorithm.
Solution:   use xoshiro128** instead of xorshift. (Kaito Udagawa,
            closes vim/vim#5279)
f8c1f9200c
2022-02-05 14:00:59 +00:00
Sean Dewar
061b06a8ae
docs(rand): cherry-pick changes from rt update 0c0734d
0c0734d527
2022-02-05 14:00:59 +00:00
Sean Dewar
f6a0d5498b
vim-patch:8.1.2343: using time() for srand() is not very random
Problem:    Using time() for srand() is not very random.
Solution:   use /dev/urandom if available
07e4a19795

Use os_open and os_close.

time_settime is N/A, so some parts of the test are disabled.

There's maybe a very, very, very, very small chance the /dev/urandom test fails,
but it shouldn't matter. :P
2022-02-05 14:00:35 +00:00
Sean Dewar
22f0725aac
vim-patch:8.1.2342: random number generator in Vim script is slow
Problem:    Random number generator in Vim script is slow.
Solution:   Add rand() and srand(). (Yasuhiro Matsumoto, closes vim/vim#1277)
06b0b4bc27

Add missing method call usage to builtin.txt.
vim_time and test_settime is N/A.
Add a modeline to test_random.vim.
Use typval_T* over listitem_T* vars so we don't need to use TV_LIST_ITEM_TV all
over the place...
Remove NULL list checks (tv_list_len covers this).
2022-02-05 13:16:34 +00:00
James McCoy
7c8ef809e6
Merge pull request #17274 from dundargoc/chore/correct-minimum-python-version
chore(gen_vimdoc): correct minimum python version
2022-02-05 08:06:58 -05:00
Dundar Göc
03e189d1a1 chore(gen_vimdoc): correct minimum python version 2022-02-05 13:36:27 +01:00
zeertzjq
9d1deed6c8
Merge pull request #17298 from zeertzjq/vim-8.2.4298
vim-patch:8.2.4298: divide by zero with huge tabstop value
2022-02-05 20:33:11 +08:00
zeertzjq
e6cfd20b7f vim-patch:8.2.4298: divide by zero with huge tabstop value
Problem:    Divide by zero with huge tabstop value.
Solution:   Reject tabstop value that overflows to zero.
fc88df42f1
2022-02-05 20:05:04 +08:00
glacambre
5b34c2ab73 fix(--headless): do not block on press-enter prompts when no UI
This commit fixes #9358, where emitting multiple messages with 'echo' or
a single one with 'echom' or 'echoerr' would result in a press-enter
prompt that couldn't be dismissed by pressing enter.

This requires adapting a few tests to spawn a UI before testing whether
press-enter prompts are blocking.

It also fixes #11718, as when combined with #15910 it enables making
sure that neovim never blocks and emits messages on startup.
2022-02-05 13:02:33 +01:00
bfredl
806a7c976d
Merge pull request #17275 from bfredl/keysethl
refactor(api): use a keyset for highlight dicts
2022-02-05 10:18:47 +01:00
zeertzjq
741b4d6262
Merge pull request #17297 from zeertzjq/test-expand
test(old): add test_expand.vim
2022-02-05 17:15:42 +08:00
zeertzjq
a4078fa57e test(old): add test_expand.vim
This removes expand_spec.lua and copies test_expand.vim from Vim at
version v8.1.2278.

The rest of patch 8.1.2278 were already applied in #15952, so this marks
that patch as fully ported.

vim-patch:8.1.2278: using "cd" with "exe" may fail

Problem:    Using "cd" with "exe" may fail.
Solution:   Use chdir() instead.
3503d7c94a
2022-02-05 16:41:23 +08:00
Dundar Göc
fa192e97d5 ci: simplify CI process 2022-02-04 23:51:51 +01:00
zeertzjq
dcbf9f93e9
Merge pull request #17288 from zeertzjq/vim-8.2.1128
vim-patch:8.2.1128: the write message mentions characters, but it's bytes
2022-02-04 23:07:21 +08:00
zeertzjq
c50cea3de4
Merge pull request #17287 from zeertzjq/vim-8.1.2133
vim-patch:8.1.2133: some tests fail when run as root
2022-02-04 22:24:38 +08:00
zeertzjq
9b0363d365 vim-patch:8.2.1128: the write message mentions characters, but it's bytes
Problem:    The write message mentions characters, but it's actually bytes.
Solution:   Change "C" to "B" and "characters" to "bytes".
3f40ce78f5
2022-02-04 22:17:25 +08:00
zeertzjq
041b2d6f1e vim-patch:8.1.2133: some tests fail when run as root
Problem:    Some tests fail when run as root.
Solution:   Add CheckNotRoot and use it. (James McCoy, closes vim/vim#5020)
07282f01da

Skip test_terminal.vim and test_viminfo.vim: N/A
2022-02-04 21:52:44 +08:00
zeertzjq
cb863d4e1f
Merge pull request #17152 from zeertzjq/vim-8.2.3583
vim-patch:8.2.3583: the "gd" and "gD" commands do not update search stats
2022-02-04 19:10:50 +08:00
zeertzjq
2fd0720de2 test: convert some search stat screendump tests to Lua screen tests 2022-02-04 18:47:20 +08:00
zeertzjq
ab7ae8806e vim-patch:8.2.3583: the "gd" and "gD" commands do not update search stats
Problem:    The "gd" and "gD" commands do not update search stats. (Gary
            Johnson)
Solution:   Clear search stats.
0c71114aed
2022-02-04 18:47:20 +08:00
zeertzjq
b9def4ae10 test(old): fix test order in test_search_stat.vim
Also avoid unnecessary divergences from upstream and add a modeline.
2022-02-04 18:47:20 +08:00
zeertzjq
6bee2bf790
Merge pull request #17272 from zeertzjq/vim-8.1.0846
vim-patch:8.1.{0846,0878,0884,2358},8.2.{0305,0352,0687,3797}
2022-02-04 09:48:48 +08:00
zeertzjq
6775a7d98f vim-patch:8.2.3797: no good reason to limit the message history in tiny version
Problem:    No good reason to limit the message history in the tiny version.
Solution:   Always use 200.
1e78deb077
2022-02-04 09:23:54 +08:00
zeertzjq
7c3064d46e vim-patch:8.2.0687: some tests do not work on FreeBSD
Problem:    Some tests do not work on FreeBSD.
Solution:   Enable modeline.  Use WaitFor() in more cases. (Ozaki Kiichi,
            closes vim/vim#6036)
41d4299f26
2022-02-04 09:23:54 +08:00
zeertzjq
a998b24c56 vim-patch:8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Problem:    FreeBSD: test for sourcing utf-8 is skipped.
Solution:   Run the matchadd_conceal test separately to avoid that setting
            'term' to "ansi" causes problems for other tests. (Ozaki Kiichi,
            closes vim/vim#5721)
36ddf93831
2022-02-04 09:23:54 +08:00
zeertzjq
94eaf3cb2f vim-patch:8.2.0305: relativenumber test fails on some systems
Problem:    Relativenumber test fails on some systems. (James McCoy)
Solution:   Clear the command line.
8040a7147f
2022-02-04 09:23:54 +08:00
zeertzjq
1e0613f58c vim-patch:8.1.2358: tests fail on Cirrus CI for FreeBSD
Problem:    Tests fail on Cirrus CI for FreeBSD.
Solution:   Fix a test and skip some. (Christian Brabandt, closes vim/vim#5281)
9134f1ecd4

Skip test_normal.vim: already applied in #11483.
2022-02-04 09:23:54 +08:00
zeertzjq
5a9e5b6c38 vim-patch:8.1.0884: double check for bsd systems
Problem:    Double check for bsd systems.
Solution:   Delete the old line.
af630d4f7f
2022-02-04 09:23:54 +08:00
zeertzjq
22a7693915 vim-patch:8.1.0878: test for has('bsd') fails on some BSD systems
Problem:    Test for has('bsd') fails on some BSD systems.
Solution:   Adjust the uname match. (James McCoy, closes vim/vim#3909)
a02e3f65c5
2022-02-04 09:23:54 +08:00
zeertzjq
4c4a80950e docs: update feature-list
Add "linux", "sun".
Remove "+shellslash" as it should be passed to exists().
Sort alphabetically and consistently use Tabs for indent.
2022-02-04 09:23:54 +08:00
zeertzjq
f25ab39faa vim-patch:8.1.0846: not easy to recognize the system Vim runs on
Problem:    Not easy to recognize the system Vim runs on.
Solution:   Add more items to the features list. (Ozaki Kiichi, closes vim/vim#3855)
39536dd557

Some doc changes have already been applied. Some others are N/A.
"moon" was removed in patch 8.2.0427 so I did not add it.
2022-02-04 09:23:54 +08:00
James McCoy
b667bb355d
Merge pull request #17283 from dundargoc/ci/reduce-log-output
ci: only show last 100 lines of log on error
2022-02-03 17:11:18 -05:00
Dundar Göc
4fa8c66bc6 ci: only show last 100 lines of log on error 2022-02-03 22:30:51 +01:00
James McCoy
59fa5f4ecf
Merge pull request #17282 from dundargoc/chore/remove-duplicate-entry
chore(gen_vimdoc): remove duplicate extmark.c entry
2022-02-03 14:11:26 -05:00
Dundar Göc
de672b6d7a chore(gen_vimdoc): remove duplicate extmark.c entry 2022-02-03 18:56:32 +01:00
Sean Dewar
9efdd927ff
Merge pull request #16976 from seandewar/vim-8.2.4018
vim-patch:8.2.{4018,4026,4028} & `nvim_win_call` fixes
2022-02-03 16:44:42 +00:00
Sean Dewar
452b46fcf7
fix(api/nvim_win_call): share common win_execute logic
We have to be sure that the bugs fixed in the previous patches also apply to
nvim_win_call.

Checking v8.1.2124 and v8.2.4026 is especially important as these patches were
only applied to win_execute, but nvim_win_call is also affected by the same
bugs. A lot of win_execute's logic can be shared with nvim_win_call, so factor
it out into a common macro to reduce the possibility of this happening again.
2022-02-03 15:03:08 +00:00
Sean Dewar
6820420d3e
vim-patch:8.2.4028: ml_get error with :doautoall and Visual area
Problem:    ml_get error with :doautoall and Visual area. (Sean Dewar)
Solution:   Disable Visual mode while executing autocommands.
cb1956d6f2

This should also fix #16937 for nvim_buf_call, so test for it.
2022-02-03 15:03:08 +00:00
Sean Dewar
d984a8d130
vim-patch:8.2.4026: ml_get error with specific win_execute() command
Problem:    ml_get error with specific win_execute() command. (Sean Dewar)
Solution:   Check cursor and Visual area are OK.
e664a32701
2022-02-03 15:03:08 +00:00
Sean Dewar
f326c9a77d
vim-patch:8.2.4018: ml_get error when win_execute redraws with Visual selection
Problem:    ml_get error when win_execute redraws with Visual selection.
Solution:   Disable Visual area temporarily. (closes vim/vim#9479)
18f4740f04

{switch_to/restore}_win_for_buf is N/A (marked as such in v8.0.0860; currently
only used in Vim's if_py).

Add a modeline to test_execute_func.vim.
2022-02-03 15:02:57 +00:00
zeertzjq
f5c4c1d768
Merge pull request #16818 from zeertzjq/vim-8.2.3454
vim-patch:8.2.{3454,3455,3497,3540,3581,3678}: some "p" and "gp" patches
2022-02-03 22:22:00 +08:00
zeertzjq
89e308d7da
Merge pull request #17226 from dundargoc/refactor/remove-redundant-code
vim-patch:8.2.4241: some type casts are redundant
2022-02-03 20:47:29 +08:00
zeertzjq
02d4c91588
Merge pull request #17268 from zeertzjq/health-noshell
fix(health): do not run external processes in a shell
2022-02-03 19:29:24 +08:00
zeertzjq
a87ecf5d08 fix(health): do not run external processes in a shell 2022-02-03 18:38:37 +08:00
Quentin Minster
5fe6bbae2d
build(win): don't try to package a PDB if not building with MSVC…
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-02-03 07:52:27 +01:00
zeertzjq
74998b0449 fix(event-loop): call vpeekc() directly first to check for character
Expand mappings first by calling `vpeekc()` directly.
2022-02-03 13:43:48 +08:00