Commit Graph

24205 Commits

Author SHA1 Message Date
zeertzjq
ae5980ec79
Merge pull request #21350 from zeertzjq/vim-8.2.4366
vim-patch:8.2.{4366,4376}: cmdline completion tests
2022-12-09 08:18:07 +08:00
zeertzjq
98dc445767 vim-patch:8.2.4376: not enough tests for command line completion
Problem:    Not enough tests for command line completion.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#9771)

9773db6f9b

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-09 07:52:50 +08:00
zeertzjq
41282259ba vim-patch:8.2.4366: not enough tests for command line completion
Problem:    Not enough tests for command line completion.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#9760)

4d03d87000

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-12-09 07:52:50 +08:00
zeertzjq
8b3412636a
test(old): change $TMPDIR from Xtest-tmpdir to X-test-tmpdir (#21346)
I've noticed a patch 8.2.4376 that uses more Xtest directories.
Change $TMPDIR to X-test-tmpdir to avoid more future divergence.
2022-12-09 07:51:37 +08:00
zeertzjq
d82096edf8
Merge pull request #21348 from zeertzjq/vim-9.0.1036
vim-patch:9.0.1036: undo misbehaves when writing from an insert mode mapping
2022-12-09 07:24:09 +08:00
zeertzjq
95044991e6 test(undo_spec): add more tests for writing in Insert mode 2022-12-09 07:00:27 +08:00
zeertzjq
70d6c335b1 vim-patch:9.0.1036: undo misbehaves when writing from an insert mode mapping
Problem:    Undo misbehaves when writing from an insert mode mapping.
Solution:   Sync undo when writing. (closes vim/vim#11674)

3f8f827723

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-09 06:55:15 +08:00
Dave Lage
ea39fc2cad
docs: dark/light color/accessibilty pass for generated html docs #21345 2022-12-08 14:00:18 -08:00
Enan Ajmain
1e2cc68889
fix(chansend): sending lines to terminal in reverse order on Windows #19315
Problem: `chansend()` on Windows sends lines in reverse order.
Cause: Using \n instead of \r\n for newlines on Windows.
Solution: on Windows, use CRLF newline characters.

Fixes #18501
2022-12-08 12:55:50 -08:00
zeertzjq
9b2c790344
Merge pull request #21338 from zeertzjq/vim-9.0.1030
vim-patch:9.0.{1030,1032}: using freed memory with the cmdline popup menu
2022-12-09 02:40:50 +08:00
zeertzjq
95c655fedc vim-patch:9.0.1032: test fails when terminal feature is missing
Problem:    Test fails when terminal feature is missing.
Solution:   Use CheckRunVimInTerminal.

b9603f6498

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-09 02:16:57 +08:00
zeertzjq
4d22424d9e vim-patch:9.0.1030: using freed memory with the cmdline popup menu
Problem:    Using freed memory with the cmdline popup menu.
Solution:   Clear the popup menu when clearing the matches. (closes vim/vim#11677)

038e6d20e6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-09 02:16:57 +08:00
Gregory Anders
9b14ad5fd9
Merge pull request #21100 from jdrouhard/lsp_semantic_tokens
LSP: semantic tokens support
2022-12-08 10:55:09 -07:00
John Drouhard
9f035559de feat(lsp): initial support for semantic token highlighting
* credit to @smolck and @theHamsta for their contributions in laying the
  groundwork for this feature and for their work on some of the helper
  utility functions and tests
2022-12-08 11:31:56 -06:00
John Drouhard
5e0c74cd82 refactor(test): create an lsp-specific helpers.lua file
* move the code for creating fake rpc servers there
2022-12-08 11:31:56 -06:00
Gregory Anders
42009ac7df
feat(treesitter): add 'lang' option to show_tree() (#21341)
This is necessary for now to support filetypes that use a parser with a
different name (e.g. the "terraform" filetype uses the "hcl" parser).
2022-12-08 09:51:46 -07:00
Gregory Anders
d44699800c
feat(treesitter): add vim.treesitter.show_tree() (#21322)
Add a "show_tree" function to view a textual representation of the
nodes in a language tree in a window. Moving the cursor in the
window highlights the corresponding text in the source buffer, and
moving the cursor in the source buffer highlights the corresponding
nodes in the window.
2022-12-08 09:22:57 -07:00
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