Commit Graph

20392 Commits

Author SHA1 Message Date
Sean Dewar
44a5875b24 vim-patch:8.2.1051: crash when changing a list while using reduce() on it
Problem:    Crash when changing a list while using reduce() on it.
Solution:   Lock the list. (closes vim/vim#6330)
ca275a05d8
2022-01-31 17:38:57 +08:00
Sean Dewar
af0bae38e2 vim-patch:8.2.0882: leaking memory when using reduce()
Problem:    Leaking memory when using reduce().
Solution:   Free the intermediate value.
48b1c21809
2022-01-31 17:38:57 +08:00
Sean Dewar
d746f5aa41 feat(eval): partially port v8.2.0878
Problem:    No reduce() function.
Solution:   Add a reduce() function. (closes vim/vim#5481)
85629985b7

Needs CHECK_LIST_MATERIALIZE from v8.2.0751 (and range_list_materialize from
8.2.0149).

Move e_reduceempty to funcs.c, as it's only used there. Make it static.
Use tv_blob_len, tv_list_len == 0 for empty checks.
Replace vim_memset(&funcexe, 0, ...) with FUNCEXE_INIT.
Leave li initially undefined (tv_list_first returns NULL if list is NULL).

This patch has a memory leak fixed by v8.2.0882.
2022-01-31 17:38:45 +08:00
zeertzjq
ba2bb6a81b refactor(indent_c.c): add const qualifiers 2022-01-31 15:44:54 +08:00
zeertzjq
ae649650de vim-patch:8.2.3938: line comment start is also found in a string
Problem:    Line comment start is also found in a string.
Solution:   Skip line comments in a string.
ba26367fea
2022-01-31 15:44:54 +08:00
zeertzjq
f7801fe138 vim-patch:8.2.3935: CTRL-U in Insert mode does not fix the indent
Problem:    CTRL-U in Insert mode does not fix the indent.
Solution:   Fix the indent when 'cindent' is set.
5d20fbf2e7
2022-01-31 15:44:54 +08:00
zeertzjq
da3b04a9e0 vim-patch:8.2.3934: repeating line comment is undesired for "O" command
Problem:    Repeating line comment is undesired for "O" command.
Solution:   Do not copy line comment leader for "O". (closes vim/vim#9426)
5ea5f37372
2022-01-31 15:44:54 +08:00
zeertzjq
88ba0774e2 vim-patch:8.2.3932: C line comment not formatted properly
Problem:    C line comment not formatted properly.
Solution:   If a line comment follows after "#if" the next line is not the end
            of a paragraph.
264d3ddac0
2022-01-31 15:44:54 +08:00
zeertzjq
eda957db10 vim-patch:8.2.3787: no proper formatting of a C line comment after a statement
Problem:    No proper formatting of a C line comment after a statement.
Solution:   Find the start of the line comment, insert the comment leader and
            indent the comment properly.
6e371ecb27
2022-01-31 15:44:54 +08:00
zeertzjq
ef5cd99df0 test: remove 003_cindent_spec.lua
This no longer needed as Vim patch 8.1.1434 has been ported.
2022-01-31 15:44:54 +08:00
Sean Dewar
2870311a37
Merge pull request #17239 from seandewar/vim-8.2.3629
vim-patch:8.2.{3433,3629}
2022-01-31 01:04:10 +00:00
Sean Dewar
d38f81849b
Merge pull request #17068 from VVKot/vim-8.2.3933
vim-patch:8.2.{3933,3973,3978,4013,4032,4048}
2022-01-31 00:42:11 +00:00
zeertzjq
62c8715ee9
vim-patch:8.1.2412: crash when evaluating expression with error (#17109) 2022-01-31 08:12:44 +08:00
zeertzjq
4dcc7bcbed
vim-patch:8.2.3532: the previous '' mark is restored after moving the cursor (#17246) 2022-01-31 08:12:29 +08:00
zeertzjq
58d01d3403
vim-patch:8.2.3475: expression register set by not executed put command (#17211) 2022-01-31 08:11:26 +08:00
VVKot
f19921be0c
vim-patch:8.2.3933: after ":cd" fails ":cd -" is incorrect
Problem:    After ":cd" fails ":cd -" is incorrect.
Solution:   Set the previous directory only after successfully changing
            directory. (Richard Doty, closes vim/vim#9419, closes vim/vim#8983)
3d0abad5bf

Adjust the test's error message check due to missing patch

vim-patch:8.2.3973: tiny build fails

Problem:    Tiny build fails.
Solution:   Adjust #ifdefs
0f7a5e758c

vim-patch:8.2.3978: build error when using dynamycally loaded Python 3

Problem:    Build error when using dynamycally loaded Python 3.
Solution:   Adjust #ifdef.
6b1a99dfe3

vim-patch:8.2.4013: build failure without the spell feature

Problem:    Build failure without the spell feature.
Solution:   Adjust #ifdefs.
e60b3c47d7

vim-patch:8.2.4032: ATTRIBUTE_NORETURN is not needed

Problem:    ATTRIBUTE_NORETURN is not needed.
Solution:   Use NORETURN(). (Ozaki Kiichi, closes vim/vim#9487)
e12406526a

vim-patch:8.2.4048: gcc complains about use of "%p" in printf

Problem:    gcc complains about use of "%p" in printf.
Solution:   Add (void *) typecast. (Dominique Pellé, closes vim/vim#9494)
c14f667626
2022-01-31 00:07:32 +00:00
Sean Dewar
c91fbc1b9e
test(oldtest): unskip Test_addr_all
v8.1.0341 has since been ported
2022-01-30 22:25:15 +00:00
Sean Dewar
796224028b
vim-patch:8.2.3629: command completion in cmdline window uses global commands
Problem:    Command completion in cmdline window uses global user commands,
            not local commands for the window where it was opened from.
Solution:   Use local commands. (closes vim/vim#9168)
a119812437
2022-01-30 22:25:15 +00:00
Sean Dewar
f8f0f14db2
vim-patch:8.2.3433: :delcommand does not take a -buffer option
Problem:    :delcommand does not take a -buffer option.
Solution:   Add the -buffer option.
bdcba24d85
2022-01-30 22:25:08 +00:00
zeertzjq
a28a9aec63
Merge pull request #16748 from zeertzjq/vim-8.1.1434
vim-patch:8.1.{1434,1585},8.2.{3482,3625,3876}: some cindent patches
2022-01-31 04:49:54 +08:00
Dundar Göc
2793fcae0a vim-patch:8.2.4241: some type casts are redundant
Problem:    Some type casts are redundant.
Solution:   Remove the type casts. (closes vim/vim#9643)
420fabcd4f

This is not a literal port but an equivalent one.
2022-01-30 19:16:51 +01:00
Rory Nesbitt
46bd48f7e9
docs(tutor): modify for Neovim rather than Vim (#17092) 2022-01-30 13:53:01 +01:00
dundargoc
abde91ecaf
docs: add example to vim.ui.select (#17241)
Closes https://github.com/neovim/neovim/issues/17137
2022-01-30 13:32:55 +01:00
zeertzjq
9aaf7a2b4d
Merge pull request #17244 from zeertzjq/vim-8.2.0092 2022-01-30 13:52:16 +08:00
zeertzjq
8a9230db26 vim-patch:8.2.0950: tagjump test fails
Problem:    Tagjump test fails.
Solution:   Adjust expected text of the prompt.
13b8205b44
2022-01-30 13:25:29 +08:00
zeertzjq
63173f23c4 vim-patch:8.2.0092: tags functionality insufficiently tested
Problem:    Tags functionality insufficiently tested.
Solution:   Add more tags tests. (Yegappan Lakshmanan, closes vim/vim#5446)
a1353b5352
2022-01-30 13:25:29 +08:00
dundargoc
4a96e7809f
chore: typo fixes (#16921)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-29 23:15:22 +00:00
bfredl
d7d015ffff
Merge pull request #16975 from dstein64/vim-8.2.3917
vim-patch:8.2.3917: the eval.txt help file is way too big
2022-01-29 23:27:12 +01:00
Daniel Steinberg
7b3cfee982 vim-patch:partial:04fb916
Update runtime files
04fb916684
2022-01-29 15:19:30 -05:00
Daniel Steinberg
a94632d212 vim-patch:8.2.3917: the eval.txt help file is way too big
Problem:    The eval.txt help file is way too big.
Solution:   Move the builtin function details to a separate file.
1cae5a0a03

Note: Neovim-specific references to |functions| were changed to
|builtin-functions|. This included updates to:
  1. test/functional/vimscript/functions_spec.lua
  2. test/functional/vimscript/eval_spec.lua
  3. runtime/doc/lua.txt
2022-01-29 15:19:29 -05:00
Gregory Anders
4458413bc0
feat(filetype): convert patterns for mail buffers (#17238) 2022-01-29 12:43:06 -07:00
bfredl
e0242c4a93
Merge pull request #17222 from bfredl/babajpy2
feat(provider)!: remove support for python2 and python3.[3-6]
2022-01-29 20:22:25 +01:00
Björn Linse
baec0d3152 feat(provider)!: remove support for python2 and python3.[3-5]
These versions of python has reached End-of-life. getting rid
of python2 support removes a lot of logic to support two
incompatible python versions in the same version.
2022-01-29 19:49:37 +01:00
bfredl
4b719e4a16
Merge pull request #17192 from zeertzjq/aucmd-redrawingdisabled
fix: set RedrawingDisabled before entering aucmd_win
2022-01-29 19:16:48 +01:00
bfredl
49837dc805
Merge pull request #17202 from zeertzjq/unused-orig-rhs
refactor: allocate an empty string as unused orig_rhs for Lua mappings
2022-01-29 19:14:19 +01:00
Christian Clason
b2f77c354a
vim-patch:8.2.4251: vala files are not recognized (#17235)
Problem:    Vala files are not recognized.
Solution:   Add the *.vala pattern. (closes vim/vim#9654)
97c554d514
2022-01-29 15:40:29 +01:00
Evgeni Chasnovski
5e1c487d99
vim-patch:8.2.4090: after restoring a session buffer order can be quite different (#17112)
Problem:    After restoring a session buffer order can be quite different.
Solution:   Create buffers first. (Evgeni Chasnovski, closes vim/vim#9520)
26ebf1f036

---------------
As in Vim, this basically reverts 8.1.0829 providing different solution
(see vim/vim#9520).

Regarding Neovim, this basically reverts changes from #15062. Test about
restoring same terminals was a bit too restrictive with using actual
buffer ids, which changed with this patch (now they should be in the
same order as at `mksession` call), so I tweaked it.
2022-01-29 14:08:44 +00:00
zeertzjq
ed0808412c
Merge pull request #17234 from zeertzjq/vim-8.2.4248 2022-01-29 21:32:44 +08:00
zeertzjq
950a88d4c2 vim-patch:8.2.4248: no proper test for moving the window separator
Problem:    No proper test for moving the window separator.
Solution:   Add a test.  Add comment in code. (closes vim/vim#9656)
a0c4e2f2d7

Remove the assertion as it is now possible for `fr` to be `NULL`.

The test fails without clearing messages. Not sure if this is a bug.
2022-01-29 20:37:48 +08:00
Daniel Steinberg
6dcdec8042
vim-patch:8.2.4052: not easy to resize a window from a plugin (#17028) 2022-01-29 20:37:07 +08:00
bfredl
cf4d025c5a
Merge pull request #17209 from bb010g/patch-1
fix(eval): v:lua support for `-` in module names
2022-01-29 11:45:15 +01:00
zeertzjq
8fc9a58256
vim-patch:8.2.0028: searchpairpos() is not tested (#17232) 2022-01-29 16:34:11 +08:00
Sean Dewar
15c9d88bb7
vim-patch:8.2.4245: ":retab 0" may cause illegal memory access
Problem:    ":retab 0" may cause illegal memory access.
Solution:   Limit the value of 'tabstop' to 10000.
652dee4486

ex_retab change is N/A (+vartabs always available).

Nvim's set_num_option validation logic was refactored, hence why it looks
different from Vim's.

Also use XFREE_CLEAR in other places.
2022-01-29 06:31:51 +00:00
Daniel Steinberg
082ff2190c
refactor: add static to some functions in funcs.c (#17030) 2022-01-29 08:22:42 +08:00
zeertzjq
1ebac3cf4e
Merge pull request #17220 from zeertzjq/unget-alt-chord 2022-01-29 06:37:44 +08:00
zeertzjq
3adc3fc540 vim-patch:8.2.3678: illegal memory access
Problem:    Illegal memory access.
Solution:   Ignore changed indent when computing byte offset.
85be8563fe
2022-01-29 06:05:39 +08:00
zeertzjq
6f04d3f3ef vim-patch:8.2.3581: reading character past end of line
Problem:    Reading character past end of line.
Solution:   Correct the cursor column.
0b5b06cb47
2022-01-29 06:05:39 +08:00
zeertzjq
436a470ef5 vim-patch:8.2.3540: the mark '] is wrong after put with a count
Problem:    The mark '] is wrong after put with a count. (Naohiro Ono)
Solution:   Use the right line number. (closes vim/vim#8956)
f47ebf1e1a
2022-01-29 06:05:39 +08:00
zeertzjq
5228850749 vim-patch:8.2.3497: put test fails when run by itself
Problem:    Put test fails when run by itself.
Solution:   Source check.vim. (Dominique Pellé, closes vim/vim#8990)
a9173d06f7
2022-01-29 06:05:39 +08:00
zeertzjq
7812c6830c vim-patch:8.2.3455: using a count with "gp" leaves '] in wrong position
Problem:    Using a count with "gp" leaves '] in wrong position. (Naohiro Ono)
Solution:   Correct the mark position. (closes vim/vim#8899)
56858e4ed4
2022-01-29 06:05:39 +08:00