Commit Graph

25316 Commits

Author SHA1 Message Date
zeertzjq
1e513fd112 vim-patch:8.2.4670: memory allocation failures for new tab page not tested
Problem:    Memory allocation failures for new tab page not tested.
Solution:   Add tests with failing memory allocation. (Yegappan Lakshmanan,
            closes vim/vim#10067)

72bb47e38f

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-02-28 21:17:42 +08:00
zeertzjq
65af424199 vim-patch:8.2.4668: buffer allocation failures insufficiently tested
Problem:    Buffer allocation failures insufficiently tested.
Solution:   Add tests for memory allocation failures. (Yegappan Lakshmanan,
            closes vim/vim#10064)

0dac1ab579

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-02-28 21:17:42 +08:00
zeertzjq
faa5d5be4b
Merge pull request #22455 from zeertzjq/vim-8.2.3438
vim-patch:8.2.{3438,3446}: blob2list(), list2blob()
2023-02-28 21:13:41 +08:00
bfredl
011b4c5c62
Merge pull request #22452 from folke/master
fix(inspect): always resolve full treesitter lang hl groups
2023-02-28 14:13:01 +01:00
bfredl
df1d15a255
Merge pull request #22454 from bfredl/lspredraw
perf(lsp): only redraw the windows containing LSP tokens
2023-02-28 14:11:27 +01:00
zeertzjq
ccac34af76 vim-patch:8.2.3446: not enough tests for empty string arguments
Problem:    Not enough tests for empty string arguments.
Solution:   Add tests, fix type check. (Yegappan Lakshmanan, closes vim/vim#8881)

820d5525ca

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-02-28 20:46:06 +08:00
zeertzjq
f6b9791212 vim-patch:8.2.3438: cannot manipulate blobs
Problem:    Cannot manipulate blobs.
Solution:   Add blob2list() and list2blob(). (Yegappan Lakshmanan,
            closes vim/vim#8868)

5dfe467432

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-02-28 20:46:06 +08:00
zeertzjq
3f381f4d04
Merge pull request #22453 from zeertzjq/vim-9.0.0795
vim-patch:9.0.{0795,0803,0810}: readblob() offset and size
2023-02-28 20:12:50 +08:00
bfredl
7e19cabeb1 perf(lsp): only redraw the windows containing LSP tokens
redraw! redraws the entire screen instead of just the windows with
the buffer which were actually changed.

I considered trying to calculating the range for the delta
but it looks tricky. Could a follow-up.
2023-02-28 13:11:36 +01:00
zeertzjq
7aad75e293 vim-patch:9.0.0810: readblob() returns empty when trying to read too much
Problem:    readblob() returns empty when trying to read too much.
Solution:   Return what is available.

5b2a3d77d3

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-28 19:52:45 +08:00
zeertzjq
4bd0611d7b vim-patch:9.0.0803: readblob() cannot read from character device
Problem:    readblob() cannot read from character device.
Solution:   Use S_ISCHR() to not check the size. (Ken Takata, closes vim/vim#11407)

43625762a9

S_ISCHR is always defined in Nvim.

Co-authored-by: K.Takata <kentkt@csc.jp>
2023-02-28 19:52:45 +08:00
zeertzjq
bfa0bc7df0 vim-patch:9.0.0795: readblob() always reads the whole file
Problem:    readblob() always reads the whole file.
Solution:   Add arguments to read part of the file. (Ken Takata,
            closes vim/vim#11402)

11df3aeee5

Remove trailing whitespace in test as done in patch 9.0.1257.
Move the help for rand() before range().

Co-authored-by: K.Takata <kentkt@csc.jp>
2023-02-28 19:52:45 +08:00
Justin M. Keyes
3b92776226
Merge #22382 has('gui_running') 2023-02-28 06:24:23 -05:00
Folke Lemaitre
7574d58304
fix(inspect): alwasy resolve full treesitter lang hl groups 2023-02-28 12:12:08 +01:00
zeertzjq
a87b52d328
Merge pull request #22448 from zeertzjq/vim-8.2.2780
vim-patch:8.2.{2780,2782,2783}
2023-02-28 17:13:24 +08:00
zeertzjq
55d30c459c vim-patch:8.2.2783: duplicate code for setting byte in blob, blob test may fail
Problem:    Duplicate code for setting byte in blob, blob test may fail.
Solution:   Call blob_set_append().  Test sort failure with "N".

e8209b91b9

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-28 16:51:31 +08:00
zeertzjq
88b70e7d46 vim-patch:8.2.2782: Vim9: blob operations not fully tested
Problem:    Vim9: blob operations not fully tested.
Solution:   Make more blob tests run in Vim9 script.  Fix filter().  Make
            insert() give an error for a null blob, like add().

39211cba72

vim-patch:8.2.3284: no error for insert() or remove() changing a locked blob

Problem:    No error for insert() or remove() changing a locked blob.
Solution:   Check a blob is not locked before changing it. (Sean Dewar,
            closes vim/vim#8696)

80d7395dcf

Co-authored-by: Bram Moolenaar <Bram@vim.org>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2023-02-28 16:51:31 +08:00
zeertzjq
0ded757c31 vim-patch:8.2.2780: Vim9: for loop over blob doesn't work
Problem:    Vim9: for loop over blob doesn't work.
Solution:   Make it work.

d551d6c268

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-28 16:51:31 +08:00
Christian Clason
66c384d4e8
vim-patch:partial:dd60c365cd26 (#22437)
vim-patch:partial:dd60c365cd26

Update runtime files

dd60c365cd

Co-authored-by: Bram Moolenaar <Bram@vim.org>

Skip: eval.txt, repeat.txt (needs `getscriptinfo()`)
2023-02-28 09:34:27 +01:00
zeertzjq
8acb3d742c
Merge pull request #22447 from zeertzjq/vim-8.2.2777
vim-patch:8.2.{1890,2777}
2023-02-28 15:45:56 +08:00
zeertzjq
761a559dbf vim-patch:8.2.2777: Vim9: blob operations not tested in all ways
Problem:    Vim9: blob operations not tested in all ways.
Solution:   Run tests with CheckLegacyAndVim9Success().  Make blob assign with
            index work.

51e933261b

Cherry-pick related changes from patches 8.2.{0633,0634}.

N/A patches for version.c:

vim-patch:8.2.2779: memory access error in remove() for blob

Problem:    Memory access error in remove() for blob.
Solution:   Adjust length for memmove().

f7e92aae15

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-28 15:21:30 +08:00
zeertzjq
99faac8644 vim-patch:8.2.1890: Vim9: strange error for subtracting from a list
Problem:    Vim9: strange error for subtracting from a list.
Solution:   Check getting a number, not a string. (closes vim/vim#7167)

081db1a66d

Cherry-pick eval_addblob() and eval_addlist() from patch 8.2.0149.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-28 15:21:14 +08:00
zeertzjq
befb47f2e1
Merge pull request #22446 from zeertzjq/vim-8.2.2757
vim-patch:8.2.{2757,2765,2767}
2023-02-28 14:12:58 +08:00
zeertzjq
1f1227f12b vim-patch:8.2.2767: compiler warning for unused argument
Problem:    Compiler warning for unused argument.
Solution:   Remove the argument.

bd6406f15d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-28 13:42:33 +08:00
zeertzjq
c554e98978 vim-patch:8.2.2765: Vim9: not all blob operations work
Problem:    Vim9: not all blob operations work.
Solution:   Run more tests also with Vim9 script and :def functions.  Fix what
            doesn't work.

0e3ff19196

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-28 13:42:04 +08:00
zeertzjq
adfa55ba99 vim-patch:8.2.2757: Vim9: blob tests for legacy and Vim9 script are separate
Problem:    Vim9: blob tests for legacy and Vim9 script are separate.
Solution:   Add CheckLegacyAndVim9Success().  Make blob index assign work.

68452177ca

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-28 13:28:24 +08:00
luukvbaal
9a271f6afd
fix(column): cmdwin cursor is offset with 'statuscolumn' (#22445) 2023-02-28 10:19:58 +08:00
zeertzjq
f113cba3ec
refactor(getchar.c): change most char_u to uint8_t (#22444) 2023-02-28 08:49:02 +08:00
zeertzjq
1b632e99f2
vim-patch:9.0.1362: ml_get error when going to another tab (#22443)
Problem:    ml_get error when going to another tab. (Daniel J. Perry)
Solution:   Do not call update_topline() if "curwin" is invalid.
            (closes vim/vim#11907)

99ad3a8bb9

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-28 08:26:00 +08:00
zeertzjq
2630341db6
fix(tui): avoid stack-use-after-scope with cursor color (#22435) 2023-02-28 07:19:03 +08:00
Lewis Russell
fb2ead6cf3
docs(usr): make usr_05.txt more coherent with Nvim changes (#22428)
- Make section 05.2 more coherent.
- Remove explanation of options that are already default.
2023-02-27 22:17:12 +00:00
Lewis Russell
8ecd129f1e
fix: address -Wmaybe-uninitialized warnings (#22436) 2023-02-27 22:16:12 +00:00
Jaehwang Jung
b50ee4a8dc
fix(diff): adjust extmarks after diffput/diffget (#22440)
Problem: on_bytes is not triggered by diffput/diffget if the line count
does not change.
2023-02-27 22:09:12 +00:00
dundargoc
521034edef
ci: build all build types on each PR (#22441)
Building with Release and RelWithDebInfo build types only on build
system changes is too optimistic, as shown by
https://github.com/neovim/neovim/pull/22436 and
659234c95a.
2023-02-27 22:47:34 +01:00
Mike
f89e3497c8
docs(lsp): update cmd_env description (#22438) 2023-02-27 21:19:41 +01:00
Amaan Qureshi
2a8e6a2f1a
vim-patch:9.0.1360: Cue files are not recognized (#22439)
Problem:    Cue files are not recognized.
Solution:   Add patterns for Cue files. (Amaan Qureshi, closes vim/vim#12067)

80c5b2c0f7
2023-02-27 21:08:31 +01:00
Justin M. Keyes
ce597235a2 feat(ui): restore has('gui_running')
Problem:
has('gui_running') is still common in the wild and our answer has
changed over time, causing frustration.
95a6ccbe9f

Solution:
Use stdin_tty/stdout_tty to decide if a UI is (not) a GUI.
2023-02-27 19:50:59 +01:00
Justin M. Keyes
7f424e2b65 feat(api): more fields in nvim_list_uis
Problem:
nvim_list_uis does not report all ":help ui-option" fields.

Solution:
Store ":help ui-option" fields on the `UI` object and update ui_array.
2023-02-27 19:50:59 +01:00
Lewis Russell
f64098a2df
fix(treesitter): fixup for health 2023-02-27 15:33:18 +00:00
zeertzjq
3f042854c8
vim-patch:9.0.1361: extendnew() not sufficiently tested (#22434)
Problem:    extendnew() not sufficiently tested.
Solution:   Add a few more test cases for extendnew(). (closes vim/vim#12075)

341f3876b3
2023-02-27 23:27:09 +08:00
Lewis Russell
5aa37e20e0
fix(treesitter): ipairs -> pairs
Fixes: https://github.com/nvim-treesitter/nvim-treesitter/issues/4349
2023-02-27 15:01:09 +00:00
Lewis Russell
da56f06037
fix(treesitter): remove virtual text from playground
Implement the range and lang annotations as comments instead
2023-02-27 10:49:19 +00:00
zeertzjq
2c9fbe34b2
vim-patch:8.2.2336: Vim9: not possible to extend dictionary with different type (#22425)
Problem:    Vim9: it is not possible to extend a dictionary with different
            item types.
Solution:   Add extendnew(). (closes vim/vim#7666)

b0e6b51364

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-27 10:10:42 +08:00
zeertzjq
d52a3f7c71
Merge pull request #22419 from zeertzjq/vim-9.0.0196
vim-patch:9.0.{0196,partial:0202,0204}: indexof()
2023-02-27 08:14:10 +08:00
zeertzjq
1f8cef53de vim-patch:9.0.0204: indexof() may leak memory
Problem:    indexof() may leak memory.
Solution:   Free allocated values. (Yegappan Lakshmanan, closes vim/vim#10916)

63acae13f5

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-02-27 07:53:17 +08:00
zeertzjq
13da3d469a vim-patch:partial:9.0.0202: code and help for indexof() is not ideal
Problem:    Code and help for indexof() is not ideal.
Solution:   Refactor the code, improve the help. (Yegappan Lakshmanan,
            closes vim/vim#10908)

3fbf6cd355

Skip CHECK_LIST_MATERIALIZE and set_vim_var_type().
Use tv_list_uidx() instead of lv_idx.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-02-27 07:53:17 +08:00
zeertzjq
0972d7a124 vim-patch:9.0.0196: finding value in list may require a for loop
Problem:    Finding value in list may require a for loop.
Solution:   Add indexof(). (Yegappan Lakshmanan, closes vim/vim#10903)

b218655d5a

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-02-27 07:34:59 +08:00
dundargoc
1e37703a74
build: remove pkgconfig-related code (#22422)
Cmake should already be able to find everything on its own.
2023-02-26 22:32:08 +01:00
Lewis Russell
774e59f3f9
feat(treesitter): expand the API 2023-02-26 16:53:33 +00:00
zeertzjq
ed58580dfe
Merge pull request #22411 from zeertzjq/vim-9.0.1354
vim-patch:9.0.{1354,1356}: "gr CTRL-G" stays in virtual replace mode
2023-02-26 23:25:37 +08:00