Commit Graph

24038 Commits

Author SHA1 Message Date
Christian Clason
3576776903
vim-patch:86b4816766d9 (#21314)
Update runtime files

86b4816766

vim-patch:9.0.1029: autoload directory missing from distribution

Problem:    Autoload directory missing from distribution.
Solution:   Add the autoload/zig directory to the list of distributed files.

84dbf855fb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-08 16:33:38 +01:00
zeertzjq
7b9ad45178
vim-patch:8.2.1634: loop to handle keys for the command line is too long (#21340)
Problem:    Loop to handle keys for the command line is too long.
Solution:   Move a few more parts to separate functions. (Yegappan Lakshmanan,
            closes vim/vim#6895)

9c929713b7
2022-12-08 22:52:25 +08:00
Raphael
50ffb8d7f4
refactor(lsp): remove deprecated vim.lsp.buf_get_clients calls (#21337) 2022-12-08 13:28:28 +01:00
zeertzjq
e2c5b21e18
test(lsp): call clear() before willSave tests (#21336)
Otherwise these two tests cannot run alone and may fail on CI.
2022-12-08 19:22:40 +08:00
zeertzjq
4f64aef29f
vim-patch:8.2.3564: invalid memory access when scrolling without valid screen (#21335)
vim-patch:8.2.3564: invalid memory access when scrolling without valid screen

Problem:    Invalid memory access when scrolling without a valid screen.
Solution:   Do not set VALID_BOTLINE in w_valid.

777e7c21b7

Remove -Z flag when using RunVim().

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-08 18:58:06 +08:00
dundargoc
a27ed57ad0
docs(lua): add guide to using Lua in Neovim (#21137)
Add introductory guide explaining how to use Lua in Neovim:
where to put Lua files, how to set variables and options, how
to create mappings, autocommands, and user commands.

Adapted with kind permission from 
https://github.com/nanotee/nvim-lua-guide
2022-12-08 11:21:42 +01:00
Mathias Fußenegger
54305443b9
feat(lsp): support willSave & willSaveWaitUntil capability (#21315)
`willSaveWaitUntil` allows servers to respond with text edits before
saving a document. That is used by some language servers to format a
document or apply quick fixes like removing unused imports.
2022-12-08 10:55:01 +01:00
zeertzjq
a505c1acc3
vim-patch:9.0.1026: type of w_last_topfill is wrong (#21332)
Problem:    type of w_last_topfill is wrong.
Solution:   Use "int" instead of "linenr_T". (closes vim/vim#11670)

2e613453ee
2022-12-08 07:39:56 +08:00
zeertzjq
f92aab5f70
vim-patch:9.0.1025: WinScrolled is not triggered when filler lines change (#21325)
Problem:    WinScrolled is not triggered when filler lines change.
Solution:   Add "topfill" to the values that WinScrolled triggers on.
            (closes vim/vim#11668)

3fc84dc2c7

Cherry-pick StopVimInTerminal() from patch 9.0.1010.
2022-12-07 18:34:39 +08:00
Gregory Anders
f8aa2a0dea
docs(treesitter): use full function names in tags (#21321) 2022-12-07 09:27:41 +01:00
zeertzjq
0caae2376e
Merge pull request #21324 from zeertzjq/vim-8.2.1768
vim-patch:8.2.1768,0e6adf8a29d5,fa3b72348d88
2022-12-07 14:51:36 +08:00
zeertzjq
214c9ed1e2 vim-patch:fa3b72348d88
Update runtime files

fa3b72348d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-07 14:25:58 +08:00
zeertzjq
c61af03cd2 vim-patch:0e6adf8a29d5
Update runtime files

0e6adf8a29

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-07 14:25:58 +08:00
zeertzjq
7dfd466437 vim-patch:8.2.1768: cannot use the help menu from a terminal window
Problem:    Cannot use the help menu from a terminal window.
Solution:   Add ":tlnoremenu" commands. (Yee Cheng Chin, closes vim/vim#7023)

b45cd36bd9

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-07 14:25:57 +08:00
zeertzjq
ed23cd3e50
fix(float): fix crash with bufpos and non-existent window (#21319) 2022-12-07 11:36:34 +08:00
zeertzjq
eab71e7875
test: add more tests for float window bufpos (#21318) 2022-12-07 10:18:12 +08:00
zeertzjq
ad244a865b
fix(events): save v:event for cmdline autocommands separately (#21316) 2022-12-07 08:57:29 +08:00
Jack Rowlingson
a069e88b4e
docs(lua): correct vim.spell.check example (#21311) 2022-12-06 16:44:43 +00:00
dundargoc
73ddb6daf9
ci(news): fetch full history (#21312)
We seem to need the parent commit of the earliest PR commit in order to
perform common git functionality to check which files were changed.
2022-12-06 17:38:24 +01:00
zeertzjq
9628348a6a
vim-patch:9.0.1017: test for srand() fails on MS-Windows (#21308)
Problem:    Test for srand() fails on MS-Windows.
Solution:   Do not expect the same result a second time.

9dacdb1d56

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-06 17:41:57 +08:00
zeertzjq
d82e56dd12
vim-patch:8.2.1622: loop to handle keys for the command line is too long (#21307)
Problem:    Loop to handle keys for the command line is too long.
Solution:   Move code to functions. (Yegappan Lakshmanan, closes vim/vim#6880)

2f3cd2e4ec

Use the command line state as only argument instead.
2022-12-06 16:31:38 +08:00
zeertzjq
6d7b94ea08
vim-patch:8.2.4393: possible number overflow with nested folds (#21305)
Problem:    Possible number overflow with nested folds.
Solution:   Avoid a negative line number.

6b43471da4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-06 11:34:20 +08:00
github-actions[bot]
9a6f481ca0
version.c: update [skip ci] (#20958)
Co-authored-by: marvim <marvim@users.noreply.github.com>

N/A patches:
vim-patch:8.1.0820: test for sending large data over channel sometimes fails
vim-patch:8.1.1133: compiler warning for uninitialized struct member
vim-patch:8.1.1699: highlight_ga can be local instead of global
2022-12-06 09:39:43 +08:00
zeertzjq
5199c333a0
vim-patch:9.0.1015: without /dev/urandom srand() seed is too predictable (#21303)
Problem:    Without /dev/urandom srand() seed is too predictable.
Solution:   Use micro seconds and XOR with process ID. (Yasuhiro Matsumoto,
            closes vim/vim#11656)

f0a9c00482

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2022-12-06 09:15:04 +08:00
zeertzjq
54a1cc0ab0
Merge pull request #21302 from zeertzjq/vim-8.2.3193
vim-patch:8.2.{3193,4204,4389},9.0.{1011,1016}: screenpos() fixes
2022-12-06 08:39:57 +08:00
zeertzjq
52b3e8bdef vim-patch:9.0.1016: screenpos() does not count filler lines for diff mode
Problem:    screenpos() does not count filler lines for diff mode.
Solution:   Add filler lines. (closes 11658)

1cb16c3a20

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-06 08:02:39 +08:00
zeertzjq
0909d987fe vim-patch:9.0.1011: ml_get error when using screenpos()
Problem:    ml_get error when using screenpos().
Solution:   Give an error for the line number. (closes vim/vim#11661)

99d19438ca

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-06 08:00:17 +08:00
zeertzjq
10af0549df vim-patch:8.2.4389: screenpos() does not handle a position in a closed fold
Problem:    screenpos() does not handle a position in a closed fold.
Solution:   Check if the position is inside a closed fold. (closes vim/vim#9778)

4556a2e868

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-06 07:51:32 +08:00
zeertzjq
6f9cda0f0a vim-patch:8.2.4204: screenpos() has non-zero row for invisible text
Problem:    screenpos() has non-zero row for invisible text.
Solution:   Only add the window row when the text is visible. (closes vim/vim#9618)

7924a17791

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-06 07:40:16 +08:00
zeertzjq
e120a049f0 fix(float): fix ml_get error with bufpos 2022-12-06 07:40:16 +08:00
zeertzjq
11d2704274 vim-patch:8.2.3193: screenpos() is wrong when 'display' is "lastline"
Problem:    screenpos() is wrong when the last line is partially visible and
            'display' is "lastline".
Solution:   Also compute the position for a partially visible line.
            (closes vim/vim#8599)

189663bdac

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-06 07:40:16 +08:00
Gregory Anders
0ff9131a92
vim-patch:9.0.1014: zir files are not recognized (#21301)
Problem:    Zir files are not recognized.
Solution:   Add a pattern for Zir files. (closes vim/vim#11664)

25201016d5

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-05 15:54:32 -07:00
ii14
f3bf1fbf60
fix(secure): crash when hitting escape in prompt (#21283)
- use pcall when calling vim.secure.read from C
- catch keyboard interrupts in vim.secure.read, rethrow other errors
- selecting "view" in prompt runs :view command
- simplify lua stack cleanup with lua_gettop and lua_settop

Co-authored-by: ii14 <ii14@users.noreply.github.com>
2022-12-05 11:59:04 -07:00
zeertzjq
707df88054
docs: add missing docs from some Vim patches (#21296)
This is cherry-picked from these Vim patches:

Only applicable change outside vi_diff.txt in patch 8.1.1226:
6c60f47fb9

Most changes outside starting.txt and vi_diff.txt in patch 8.1.1280:
25c9c680ec

Missing docs for 'mousemoveevent':
cbaff5e06e
2022-12-05 21:09:31 +08:00
dundargoc
6c285a6e49
ci: create CI job to check if news needs to be updated (#21142)
If any commit message in the PR is either of type "feat" or is a
breaking change, then there's a high probability that news.txt should be
updated. Give an error if news.txt hasn't been updated in that case.

This workflow cannot 100% correctly determine if news.txt should be
updated even if the commit messages were exactly correct. The entries in
news.txt is determined by changes between releases, while the commit
messages are based on the master branch. While it is an approximation,
it is still a useful enough one that it's still valuable to have this
job as a reminder even if it gives an error if it shouldn't. In these
cases it is perfectly fine to ignore the failure for this job.
2022-12-05 11:58:30 +01:00
dundargoc
5c52971f60
ci: use shell script to deduplicate workflow (#21079) 2022-12-05 11:58:13 +01:00
dundargoc
9d8dbd9846
ci: use local action to make make cache keys consistent (#20538)
The advantages of using an action is that it reduces boilerplate and
repetition from the main ci.yml workflow.
2022-12-05 11:57:52 +01:00
zeertzjq
89374da798
vim-patch:8.2.2328: some test files may not be deleted (#21194)
Problem:    Some test files may not be deleted.
Solution:   Add a delete() call, correct name. (Dominique Pellé, closes vim/vim#7654)

48e11c1054
2022-12-05 10:47:05 +08:00
zeertzjq
1c6f7e5933
Merge pull request #21292 from zeertzjq/vim-8.2.1195
vim-patch:8.2.{1195,1197,2240,3108,3109,3495,3499,3526,5145}
2022-12-05 10:22:47 +08:00
zeertzjq
9ae6b03e7a vim-patch:8.2.5145: exit test causes spurious valgrind reports
Problem:    Exit test causes spurious valgrind reports.
Solution:   Skip test.  Add CheckNotValgrind.

cf801d4b95

Cherry-pick RunningWithValgrind() from patch 8.2.5136.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-05 09:55:18 +08:00
zeertzjq
ba9fcc22ef vim-patch:8.2.3526: tests have clumsy check for X11 based GUI
Problem:    Tests have clumsy check for X11 based GUI.
Solution:   Add CheckX11BasedGui.

40bd5a1540

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-05 09:55:18 +08:00
zeertzjq
e043dbf0aa vim-patch:8.2.3499: GUI geometry startup test fails
Problem:    GUI geometry startup test fails.
Solution:   Check string values instead of numbers

3d031a0ae7

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-05 09:55:18 +08:00
zeertzjq
78fa1f069d vim-patch:8.2.3495: GUI geometry startup test fails on some systems
Problem:    GUI geometry startup test fails on some systems. (Drew Vogel)
Solution:   Add tolerance to the size check. (closes vim/vim#8815)

b376aa2da4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-05 09:55:18 +08:00
zeertzjq
e9ad613fdf vim-patch:8.2.3109: check for $DISPLAY never fails
Problem:    Check for $DISPLAY never fails.
Solution:   Use eval().

f6d877975b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-05 09:51:08 +08:00
zeertzjq
adcf7a2219 vim-patch:8.2.3108: test for remote_foreground() fails
Problem:    Test for remote_foreground() fails. (Elimar Riesebieter)
Solution:   Check that $DISPLAY is set. (Christian Brabandt)

d6fa7bd5b9

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-05 09:50:54 +08:00
zeertzjq
060789e335 vim-patch:8.2.2240: clientserver test fails if full path is used
Problem:    Clientserver test fails if full path is used.
Solution:   Ignore the path preceding the file name.

41a834d1e3

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-05 09:50:18 +08:00
zeertzjq
ee944ef103 vim-patch:8.2.1197: clientserver test still fails on MS-Windows
Problem:    Clientserver test still fails on MS-Windows.
Solution:   Expect a different error message.

c212dd0a34

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-05 09:49:44 +08:00
zeertzjq
5d691a4669 vim-patch:8.2.1195: clientserver test fails on MS-Windows
Problem:    Clientserver test fails on MS-Windows.
Solution:   Expect a different error message.

4d57ba0202

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-05 09:49:32 +08:00
Mathias Fußenegger
b098e7971f
fix(lsp): ensure open_logfile is safe for fast events (#21288)
Closes https://github.com/neovim/neovim/issues/21052
2022-12-04 18:02:24 +01:00
Mathias Fußenegger
ec6ba87229
Merge pull request #21287 from mfussenegger/lsp-show-document
fix(lsp): call show_document with correct args
2022-12-04 16:29:05 +01:00