Commit Graph

25152 Commits

Author SHA1 Message Date
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
zeertzjq
6644742c26 vim-patch:9.0.1356: cannot cancel "gr" with Esc
Problem:    Cannot cancel "gr" with Esc.
Solution:   Make "gr<Esc>" do nothing. (closes vim/vim#12064)

4f026ea9f1

N/A patches for version.c:

vim-patch:9.0.1347: "gr CTRL-O" stays in Insert mode

Problem:    "gr CTRL-O" stays in Insert mode. (Pierre Ganty)
Solution:   Do not set restart_edit when "cmdchar" is 'v'. (closes vim/vim#12045)

2824d1ee32

vim-patch:9.0.1349: "gr" with a count fails

Problem:    "gr" with a count fails.
Solution:   Break out of the loop only after using the count.

3ddb1182b7
2023-02-26 23:04:54 +08:00
zeertzjq
5e846978e3 vim-patch:9.0.1354: "gr CTRL-G" stays in virtual replace mode
Problem:    "gr CTRL-G" stays in virtual replace mode. (Pierre Ganty)
Solution:   Prepend CTRL-V before control characters. (closes vim/vim#12045)

d6a4ea3aa0

Cherry-pick Test_edit_gr_special() from patch 9.0.1347.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-02-26 23:01:50 +08:00
bfredl
48990a7077
Merge pull request #22417 from bfredl/antifree
fix(build): fix invalid use of EXITFREE
2023-02-26 14:20:26 +01:00
bfredl
659234c95a fix(build): fix invalid use of EXITFREE
fixup 6942528 refactor(ui): ui_log() can now just be a function
2023-02-26 13:55:29 +01:00
dundargoc
aaea48aac6
build: set libtermkey project language to C (#22410)
This will prevent cmake from failing the build if a C++ compiler isn't
found.
2023-02-26 13:32:37 +01:00
bfredl
f3476f2f99
Merge pull request #22408 from bfredl/ui_log
refactor(ui): ui_log() can now just be a function
2023-02-26 11:32:01 +01:00
dundargoc
1d8b77da6b
fix(MSVC): set the active code page to utf-8 (#22384)
Neovim expects character encoding to be UTF-8, and deviation from this
causes bugs such as lua files not being recognized for non-ascii paths.
This changes the behavior of fopen, which defaults to using the
currently active codepage.

Closes: https://github.com/neovim/neovim/issues/18122
2023-02-26 08:12:41 +08:00
bfredl
6942528a54 refactor(ui): ui_log() can now just be a function 2023-02-25 23:29:00 +01:00
Mathias Fußenegger
c1514d7e67
fix(lsp): fix some type annotations (#22397) 2023-02-25 18:47:05 +01:00
Mathias Fußenegger
db32d312ac
ci(fix): repair regen-api-docs (#22403)
https://github.com/neovim/neovim/pull/22398 broke the job because there
is no `build/bin/nvim`

This keeps the preference for `build/bin/nvim` but adds back `nvim` as
fallback if it doesn't exist.
2023-02-25 17:24:43 +01:00
Mathias Fußenegger
2708507e87
docs: use build/bin/nvim instead of nvim in gen_vimdoc (#22398)
Problem:

`nvim` could point to stable release missing the `nvim -l`
functionality.

Solution:

Require to build nvim first and use `build/bin/nvim`
2023-02-25 16:35:45 +01:00
Mathias Fussenegger
f0f27e9aef Revert "feat(lsp): implement workspace/didChangeWatchedFiles (#21293)"
This reverts commit 5732aa706c.

Causes editor to freeze in projects with many watcher registrations
2023-02-25 11:17:28 +01:00
Jon Huhn
5732aa706c
feat(lsp): implement workspace/didChangeWatchedFiles (#21293) 2023-02-25 10:07:18 +01:00
dundargoc
a601d03112
build: build luajit in parallel (#22327)
Add -j flag to the make command for luajit. Cuts down dependency build time by 40% when using the Ninja generator.
2023-02-24 21:17:23 +01:00