Commit Graph

20438 Commits

Author SHA1 Message Date
Christian Clason
51444bef24
Merge pull request #17306 from clason/vim-8.2.4305
* Vim 8.2.4305: tex filetype detection fails
* Vim 8.2.4306: no test for fixed perl filetype check
2022-02-06 15:33:39 +01:00
James McCoy
4903949033
Merge pull request #17277 from laomaiweng/windows-debug-symbols
build(win): package the debug symbols (PDB file) along with nvim.exe
2022-02-06 09:32:18 -05:00
James McCoy
2ff4726fae
Merge pull request #17310 from jamessan/commitlint
ci(commitlint): use lintcommit.lua from main repo
2022-02-06 09:28:24 -05:00
James McCoy
707cc1a167
ci(commitlint): use lintcommit.lua from main repo
[skip ci]
2022-02-06 08:31:23 -05:00
zeertzjq
8f0b3cadbe vim-patch:8.2.4307: a few more messages should not be translated
Problem:    A few more messages should not be translated.
Solution:   Remove _().
0c1550d9e9
2022-02-06 21:13:03 +08:00
zeertzjq
daf7c17cdb vim-patch:8.2.4303: a few messages should not be translated
Problem:    A few messages should not be translated.
Solution:   Remove _(). (Dominique Pellé, closes vim/vim#9702)
cd53eed2c5
2022-02-06 21:13:03 +08:00
Christian Clason
06d2d271d7 vim-patch:8.2.4306: no test for fixed perl filetype check
Problem:    No test for fixed perl filetype check.
Solution:   Add a test. Sort test functions.
500761b1cf
2022-02-06 12:19:55 +01:00
Christian Clason
05f38bbede vim-patch:8.2.4305: tex filetype detection fails
Problem:    Tex filetype detection fails.
Solution:   Check value to be positive. (closes vim/vim#9704)
e5b7897585
2022-02-06 12:10:09 +01:00
zeertzjq
d65ee12914 vim-patch:8.2.1741: pathshorten() only supports using one character
Problem:    pathshorten() only supports using one character.
Solution:   Add an argument to control the length. (closes vim/vim#7006)
6a33ef0deb

Cherry-pick a line in test from patch 8.2.0634.
Use Nvim's config paths in docs.

shorten_dir() returning a pointer looks a bit confusing here, as it is
actually the same pointer passed to it, and it doesn't really reduce
much code, so change it back to void.

Assigning rettv->vval.v_string = NULL is not needed if a pointer is
within 64 bits. While this is usually the case, I'm not sure if it can
be taken for granted.
2022-02-06 16:29:12 +08:00
zeertzjq
8215c05945
Merge pull request #17194 from zeertzjq/inccommand-prev-sub
fix(inccommand): do not change reg_prev_sub when previewing
2022-02-06 10:18:59 +08:00
Sean Dewar
28d5face21
Merge pull request #16862 from seandewar/vim-8.2.2658
vim-patch:8.2.{2658,2661,2736}: for loop over strings
2022-02-06 00:02:30 +00:00
Lewis Russell
b518b577ea fix(lua): restore priority of the preloader
Neovim currently places its own loader for searching runtime files at
the front of `package.loaders`. This prevents any preloaders in
`package.preload` from being used. This change fixes that by moving the
default package preloader to run before Neovim's loader. For example,
LuaJIT provides preloaders for the built-in modules `ffi` and `bit`, so
this optimisation will improve the loading of those.
2022-02-05 21:46:04 +00:00
zeertzjq
b17f1e6fe8
Merge pull request #17077 from zeertzjq/vim-8.2.2324
vim-patch:8.2.{1727,2324,2363}: charcol(), getcharpos(), getcursorcharpos(), setcharpos(), setcursorcharpos()
2022-02-06 05:18:02 +08:00
zeertzjq
be9dbc925c vim-patch:partial:6aa57295cfbe
Update runtime files
6aa57295cf
2022-02-06 04:46:16 +08:00
zeertzjq
46d1b8ed1f vim-patch:partial:2346a6378483
Update runtime files
2346a63784
2022-02-06 04:46:16 +08:00
zeertzjq
8c3244c9a1 vim-patch:8.2.2363: curpos() does not accept a string argument as before
Problem:    curpos() does not accept a string argument as before.
solution:   Make a string argument work again. (Yegappan Lakshmanan,
            closes vim/vim#7690
9ebcf231bd
2022-02-06 04:46:16 +08:00
zeertzjq
6ab71683d1 vim-patch:8.2.2324: not easy to get mark en cursor posotion by character count
Problem:    Not easy to get mark en cursor posotion by character count.
Solution:   Add functions that use character index. (Yegappan Lakshmanan,
            closes vim/vim#7648)
6f02b00bb0
2022-02-06 04:46:16 +08:00
zeertzjq
8ba9f19961 vim-patch:8.2.1727: a popup created with "cursorline" will ignore "firstline"
Problem:    A popup created with "cursorline" will ignore "firstline".
Solution:   When both "cursorline" and "firstline" are present put the cursor
            on "firstline". (closes vim/vim#7000)  Add the "winid" argument to
            getcurpos().
99ca9c4868

Skip popup window related code.
Cherry-pick all of Test_getcurpos_setpos() from patch 8.2.0610.
2022-02-06 04:46:16 +08:00
Sean Dewar
8adbba7ac3
feat(eval): port emsg from v8.2.3284
80d7395dcf
2022-02-05 19:55:17 +00:00
Sean Dewar
83a48d7a44
vim-patch:8.2.2661: leaking memory when looping over a string
Problem:    Leaking memory when looping over a string.
Solution:   Free the memory.
bb5d87c850
2022-02-05 19:55:16 +00:00
Sean Dewar
7002a3433b
vim-patch:8.2.2658: :for cannot loop over a string
Problem:    :for cannot loop over a string.
Solution:   Accept a string argument and iterate over its characters.
74e54fcb44

v8.2.2659 is already ported.

N/A patches for version.c:

vim-patch:8.2.2736: Vim9: for loop over string is a bit slow

Problem:    Vim9: for loop over string is a bit slow.
Solution:   Avoid using strlen().
175a41c13f
2022-02-05 19:55:11 +00:00
Lewis Russell
92e92f02e7
fix(diff): make algorithm work for vim.diff (#17300)
Fixes #17207
2022-02-05 09:49:48 -08:00
bfredl
cee944e3ee
Merge pull request #17199 from glacambre/fix_9358
fix(--headless): do not block on press-enter prompts when no UI
2022-02-05 16:47:51 +01:00
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