Commit Graph

22517 Commits

Author SHA1 Message Date
Christian Clason
d212dfd676 ci(release): build with standard gcc on Ubuntu
Ubuntu-20.04 ships with GCC 10.3.0, which is enough to avoid #14150
2022-08-09 18:10:18 +02:00
Christian Clason
48241c3b23 ci(release): bump deprecated ubuntu image to 20.04
`ubuntu-18.04` is now deprecated and subject to outages, see
  https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/
2022-08-09 18:10:18 +02:00
zeertzjq
24bf0490ea
vim-patch:9.0.0176: checking character options is duplicated and incomplete (#19690)
Problem:    Checking character options is duplicated and incomplete.
Solution:   Move checking to check_chars_options(). (closes vim/vim#10863)
8ca29b6a35
2022-08-09 20:35:34 +08:00
Christian Clason
33ddca6fa0
docs(lua): add luv (vim.loop) reference manual (#19679)
Upstreamed from https://github.com/nanotee/luv-vimdocs with kind
permission from @nanotee.
2022-08-09 13:21:50 +02:00
zeertzjq
cd14efd281
vim-patch:8.1.1823: command line history code is spread out (#19688)
Problem:    Command line history code is spread out.
Solution:   Put the code in a new file. (Yegappan Lakshmanan, closes vim/vim#4779)
            Also graduate the +cmdline_hist feature.
d7663c22c6
2022-08-09 17:13:44 +08:00
Christian Clason
a5e846b996
vim-patch:partial: 48c3f4e0bff7 (#19684)
vim-patch:partial:48c3f4e0bff7

Update runtime files
48c3f4e0bf

partially skip `options.txt` (needs 9.0.0138)
2022-08-09 10:43:28 +02:00
dundargoc
e6680ea7c3
docs(lua): add Lua 5.1 reference manual (#19663)
based on http://www.vim.org/scripts/script.php?script_id=1291
reformatted to match Nvim documentation style; removed irrelevant sections

Co-authored-by: dundargoc <gocundar@gmail.com>
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
2022-08-08 18:58:32 +02:00
Mathias Fußenegger
68c674af0f
feat(lsp): set formatexpr by default (#19677)
Follow up to https://github.com/neovim/neovim/pull/19003
2022-08-08 18:30:17 +02:00
zeertzjq
d31ee6664d
test: increse expect_exit() timeouts (#19680)
A timeout of 100 milliseconds is sometimes still too short for macOS.
Change it to 1000 milliseconds.
2022-08-08 22:04:21 +08:00
zeertzjq
d36c2fa713
Merge pull request #19674 from zeertzjq/vim-8.2.1535
vim-patch:8.2.{1535,1537,3545}: setcellwidths()
2022-08-08 21:20:27 +08:00
zeertzjq
603f7bd253 fix(fillchars): change fallback after setcellwidths() 2022-08-08 20:03:40 +08:00
zeertzjq
9fedb6fd78 vim-patch:8.2.3545: setcellwidths() may make 'listchars' or 'fillchars' invalid
Problem:    setcellwidths() may make 'listchars' or 'fillchars' invalid.
Solution:   Check the value and give an error. (closes vim/vim#9024)
94358a1e6e

Cherry-pick f_setcellwidths() change from patch 9.0.0036.
Cherry-pick 'ambiwidth' docs update from runtime update 079ba76ae7a7.
2022-08-08 20:03:40 +08:00
zeertzjq
01a7009af9 refactor(setcellwidths): use TV_LIST_ITEM_NEXT properly 2022-08-08 20:03:40 +08:00
zeertzjq
967415d527 vim-patch:8.2.1537: memory acccess error when using setcellwidths()
Problem:    Memory acccess error when using setcellwidths().
Solution:   Use array and pointers correctly.
b06a6d59d1
2022-08-08 20:03:40 +08:00
zeertzjq
53c9500c1d vim-patch:8.2.1535: it is not possible to specify cell widths of characters
Problem:    It is not possible to specify cell widths of characters.
Solution:   Add setcellwidths().
08aac3c619

Co-Authored-By: delphinus <me@delphinus.dev>
2022-08-08 20:03:40 +08:00
zeertzjq
bc8fbb7c1d refactor: move non-symbols in mbyte.h to mbyte_defs.h
This just avoids including mbyte.h in eval/typval.h, so that mbyte.h can
include eval/typval.h in Vim patch 8.2.1535.
2022-08-08 20:03:40 +08:00
Mathias Fußenegger
a46e6afb8b
fix(lsp): set end_col in formatexpr (#19676)
The last line was excluded from formatting via formatexpr because the
character in the params was set to 0 instead of the end of line.
2022-08-08 13:02:15 +02:00
Mathias Fußenegger
2d5fce2cdb
feat(lsp): disable exit_timeout by default (#19672)
The lsp client used to wait up to 500ms for a language server to
shutdown before sending a TERM signal.

The intention behind the 500ms grace period was to ensure the language
server exits to prevent stale processes, but it has the side-effect that
it can interrupt language-servers which are too slow to shutdown within
500ms. Language servers tend to write out index files or project files
on shutdown, and being interrupted during this process can cause
corruption of those files.

This changes the default to not wait at all, at the risk of leaving
stale processes around if the language server isn't well behaved.

An alternative would be to wait indefinitely, but that can cause neovim
to take several seconds to exit.
2022-08-08 12:34:37 +02:00
zeertzjq
18766e742b
fix(folds): fix fold remains when :delete makes buffer empty (#19673) 2022-08-08 06:07:59 +08:00
zeertzjq
629169462a
fix(terminal): skip aucmd_win when checking terminal size (#19668) 2022-08-07 19:43:29 +08:00
zeertzjq
fa8b2b4c50
vim-patch:8.2.4492: no error if an option is given a value with ":let &opt = val" (#19670)
Problem:    No error if an option is given an invalid value with
            ":let &opt = val".
Solution:   Give the error. (closes vim/vim#9864)
8ccbbeb620
2022-08-07 17:11:03 +08:00
zeertzjq
fea15adad3
Merge pull request #19669 from zeertzjq/vim-8.2.1278
vim-patch:8.2.{1278,1280,1281}: error message improvements
2022-08-07 15:22:48 +08:00
zeertzjq
48051ed62c vim-patch:8.2.1281: the "trailing characters" error can be hard to understand
Problem:    The "trailing characters" error can be hard to understand.
Solution:   Add the trailing characters to the message.
2d06bfde29
2022-08-07 14:39:19 +08:00
zeertzjq
d0686540f5 vim-patch:8.2.1280: Ex command error cannot contain an argument
Problem:    Ex command error cannot contain an argument.
Solution:   Add ex_errmsg() and translate earlier.  Use e_trailing_arg where
            possible.
8930caaa1a

Remove duplicate test file 062_tab_pages_spec.lua
2022-08-07 14:38:57 +08:00
zeertzjq
3b7fc5f793 vim-patch:8.2.1278: Vim9: line break after "->" only allowed in :def function
Problem:    Vim9: line break after "->" only allowed in :def function.
Solution:   Only allow line break after "->". (closes vim/vim#6492)
dd1a9af00f
2022-08-07 13:47:40 +08:00
Lewis Russell
0fdf59ac9d
fix(api): nvim_cmd handle 0 range (#19655)
Fixes #19608
2022-08-06 13:53:37 +01:00
zeertzjq
0df1418ffa
vim-patch:8.2.1873: Vim9: missing white space when using <f-args> (#19657)
Problem:    Vim9: missing white space when using <f-args>.
Solution:   Add spaces. (Christian J. Robinson)
20d89e0ac6
2022-08-06 20:05:46 +08:00
zeertzjq
5eb8119dce
vim-patch:8.2.3282: Vim9: error about using -complete without -nargs is confusing (#19656)
Problem:    Vim9: error about using -complete without -nargs is confusing.
Solution:   Change the wording.
41a3485dd6
2022-08-06 19:18:43 +08:00
zeertzjq
ad7064bd83
vim-patch:8.1.1210: support for user commands is spread out (#19653)
Problem:    Support for user commands is spread out. No good reason to make
            user commands optional.
Solution:   Move user command support to usercmd.c.  Always enable the
            user_commands feature.
ac9fb18020
2022-08-06 17:14:37 +08:00
zeertzjq
5f0fbe7c2f
vim-patch:8.1.0942: options window still checks for the multi_byte feature (#19652)
Problem:    Options window still checks for the multi_byte feature.
Solution:   Remove the unnecessary check. (Dominique Pelle, closes vim/vim#3990)
76cbe811da
2022-08-06 08:29:57 +08:00
zeertzjq
a308f53525
fix(api): fix nvim_buf_set_text heap-use-after-free (#19644)
The line returned but ml_get_buf() may be freed by another call to
ml_get_buf(), so it is necessary to make a copy.
2022-08-06 06:22:01 +08:00
Cai.MY
85ad0e6b43
fix(lsp): avoid ^M character in hover window on Windows (#19640) 2022-08-05 15:23:01 +02:00
zeertzjq
58e1c6fbff
test(old): clear builtin menus before running tests (#19647)
Otherwise Test_menu_expand() fails when run alone.
2022-08-05 18:50:20 +08:00
Christian Clason
21f5aee777
vim-patch:9.0.0141: "delmenu" does not remove autocmmands (#19646)
Problem:    "delmenu" does not remove autocmmands. Running menu test function
            alone fails.
Solution:   Delete autocommands Make sure there is at least one menu.
            (closes vim/vim#10848)
206fce307b
2022-08-05 12:23:41 +02:00
Jonas Strittmatter
7ebcb9b333
docs: improve example in incremental preview section (#19613)
- Separate preview and callback functions to make the example easier to understand
- Use false instead of 0 for boolean arguments in API function calls
- Remove explicit nil checks for consistency
- Format with stylua
2022-08-05 10:16:26 +08:00
zeertzjq
a78606ec53
test(let_spec): increase expect_exit() timeout
Test ":unlet self-referencing node in a List graph #6070" feeds many characters into typeahead, so a timeout of only 100 milliseconds sometimes fails. Change that timeout to 1000 milliseconds.
2022-08-05 08:32:54 +08:00
zeertzjq
37ab823e6e
Merge pull request #19642 from zeertzjq/vim-8.2.0413
vim-patch:8.2.{0413,0478},9.0.0009: menu patches
2022-08-05 08:27:40 +08:00
zeertzjq
3aef2b8bdf vim-patch:9.0.0009: going past the end of a menu item with only modifier
Problem:    Going past the end of a menu item with only modifier.
Solution:   Check for NUL.
083692d598
2022-08-05 07:58:38 +08:00
zeertzjq
57fbcc6929 vim-patch:8.2.0478: new buffers are not added to the Buffers menu
Problem:    New buffers are not added to the Buffers menu.
Solution:   Turn number into string. (Yee Cheng Chin, closes vim/vim#5864)
5908fdf72f
2022-08-05 07:56:56 +08:00
zeertzjq
d985323c55 vim-patch:8.2.0413: buffer menu does not handle special buffers properly
Problem:    Buffer menu does not handle special buffers properly.
Solution:   Keep a dictionary with buffer names to reliably keep track of
            entries.
            Also trigger BufFilePre and BufFilePost for command-line and
            terminal buffers when the name changes.
5e94a29ebb
2022-08-05 07:53:54 +08:00
zeertzjq
c1e1d16fca
Merge pull request #19638 from zeertzjq/vim-8.2.0385
vim-patch:8.2.{0385,0392,3459}: menu_info()
2022-08-05 07:25:23 +08:00
zeertzjq
5170a4a369 vim-patch:8.2.3459: Vim9: need more tests for empty string arguments
Problem:    Vim9: need more tests for empty string arguments.
Solution:   Add more tests.  Also use empty argument with menu_info() to get
            the top-level menu names. (Yegappan Lakshmanan, closes vim/vim#8925)
51491adfa8
2022-08-05 06:47:24 +08:00
zeertzjq
93649cefab vim-patch:8.2.0392: Coverity warns for using array index out of range
Problem:    Coverity warns for using array index out of range.
Solution:   Add extra "if" to avoid warning.
56cb337872
2022-08-05 06:47:24 +08:00
zeertzjq
77926b6493 vim-patch:8.2.0385: menu functionality insufficiently tested
Problem:    Menu functionality insufficiently tested.
Solution:   Add tests.  Add menu_info(). (Yegappan Lakshmanan, closes vim/vim#5760)
0eabd4dc8f

Omit feedkeys() change: even if "L" flag is implemented it will likely
use input_enqueue(), which already checks for interrupts.

Omit Test_mouse_popup_menu(): already tested in Lua.
2022-08-05 06:47:24 +08:00
zeertzjq
69299380ca fix(menu): make :menu still print header when there are no menus 2022-08-05 06:29:05 +08:00
zeertzjq
27ce21ac85
vim-patch:partial:8.2.0897: list of functions in patched version is outdated (#19637)
Problem:    List of functions in patched version is outdated.
Solution:   Update the function lists only.
ebacddbc16
2022-08-04 11:05:49 +08:00
rhcher
7c997dbc5d
fix(lsp): prevent unexpected position jumps (#19370) 2022-08-03 21:44:33 +02:00
Justin M. Keyes
43cd91a4f4
Merge #19626 build: cleanup old cmake files 2022-08-03 07:54:53 -07:00
zeertzjq
0a29267514
fix(completion): remove wrong FUNC_ATTR_NONNULL_ALL (#19627) 2022-08-03 21:50:14 +08:00
ii14
3df8d9b8c5
feat(lua): print source locations of lua callbacks (#19597)
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2022-08-03 13:41:17 +01:00