Commit Graph

25920 Commits

Author SHA1 Message Date
James McCoy
0abb96f554
ci(s390x): double TEST_TIMEOUT since tests are running via qemu
(cherry picked from commit 1beef6cd21)
2023-12-19 07:38:10 -05:00
dundargoc
5677563743
ci: various fixes
- install attr only when tesitng
- fix s390x workflow by checking out the merge PR instead of master

(cherry picked from commit 9ad239690f)
2023-12-19 07:38:09 -05:00
dundargoc
205e8e4bcf
ci: add optional CI that can be triggered manually
These are meant for expensive or situational tests that may not be
suitable to run each time, but can occasionally be useful.

Currently only add testing for s390x. The job is enabled by adding the
ci-s390x label in github.

(cherry picked from commit 20dd9f3a26)
2023-12-19 07:38:09 -05:00
zeertzjq
f538e4fd01
Merge pull request #26649 from neovim/backport-26648-to-release-0.9
[Backport release-0.9] fix(api): don't set coladd of mark
2023-12-19 08:15:22 +08:00
zeertzjq
2f5ba9c543 fix(api): don't set coladd of mark
(cherry picked from commit a07a651ac0)
2023-12-19 00:01:25 +00:00
dundargoc
aa90d521de build: fix universal mac builds
Cmake 3.28+ will fail if two projects download the same file to prevent
scheduling problems. This can be circumvented by downloading luajit to a
unique location for each target. This is theoretically non-optimal since
we need to download the same file three times for universal builds, but
universal builds are rare and the convenience of this method outweighs
setting up the dependencies optimally. This fixes the currently broken
release workflow for mac.

Closes https://github.com/neovim/neovim/issues/26526.

(cherry picked from commit d5c656c7d0)
2023-12-18 21:17:13 +01:00
zeertzjq
25bedc9251
Merge pull request #26544 from neovim/backport-26542-to-release-0.9
[Backport release-0.9] vim-patch:9.0.2159: screenpos() may crash with neg. column
2023-12-13 06:31:00 +08:00
zeertzjq
9caec77fae vim-patch:9.0.2159: screenpos() may crash with neg. column
Problem:  screenpos() may crash with neg. column
Solution: validate and correct column

closes: vim/vim#13669

ec54af4e26
(cherry picked from commit 6052fac625)
2023-12-12 22:18:11 +00:00
zeertzjq
59dd7aed40
Merge pull request #26477 from neovim/backport-26476-to-release-0.9
[Backport release-0.9] vim-patch:ff0baca86523
2023-12-09 07:55:26 +08:00
zeertzjq
22ea5ec166 vim-patch:ff0baca86523
runtime(syntax): unlet b:filetype_in_cpp_family for cpp & squirrel

Update runtime/syntax/cpp.vim and runtime/syntax/squirrel.vim to unlet
b:filetype_in_cpp_family as it remains set even after updating the ft of
a file manually or through a modeline, not allowing c specific keywords
to be highlighted.

Since the variable b:filetype_in_cpp_family is only used by the c.vim
syntax script, unlet it directly after sourcing the c.vim runtime file
instead of at the end of the script.

Also update the last Change Header for both files.

closes: vim/vim#13650

ff0baca865

Co-authored-by: laburnumT <laburnumtec@gmail.com>
(cherry picked from commit 6333be96ca)
2023-12-08 23:45:48 +00:00
Christian Clason
4ca8f7f60d fix(treesitter): remove incompatible c query (again) 2023-12-07 22:39:47 +01:00
github-actions[bot]
201e9083d6
[Backport release-0.9] fix(log): increase size of buffer for nvim instance name (#26450)
fix(log): increase size of buffer for nvim instance name

16 bytes is not enough room for existing usage of the buffer by the
tests, so the name may get truncated and cause log_spec test to fail:

    FAILED   test/functional/core/log_spec.lua @ 30: log messages are formatted with name or test id
    test/helpers.lua:146: retry() attempts: 51
    test/helpers.lua:155: Pattern "%.%d+%.%d/c +server_init:%d+: test log message" not found in log (last 100 lines): Xtest_logging:
        ERR 2023-11-24T23:36:34.252 T1274.2445945.0 server_init:57: test log message
        ERR 2023-11-24T23:36:34.275 T1274.2445945.0 server_init:57: test log message

(cherry picked from commit ec80e4cb4d)

Co-authored-by: James McCoy <jamessan@jamessan.com>
2023-12-07 07:39:01 -05:00
zeertzjq
a255e1c289
Merge pull request #26447 from neovim/backport-26445-to-release-0.9
[Backport release-0.9] fix(inccommand): don't crash with "split" and 'n' flag
2023-12-07 16:53:07 +08:00
zeertzjq
b56a18b1df fix(inccommand): don't crash with "split" and 'n' flag
(cherry picked from commit bc5b0da84e)
2023-12-07 08:39:49 +00:00
zeertzjq
f4642d4c81 test(inccommand_spec): actually trigger 'inccommand' preview
(cherry picked from commit 93011add10)
2023-12-07 08:39:48 +00:00
zeertzjq
719b300180
Merge pull request #26444 from neovim/backport-23343-to-release-0.9
[Backport release-0.9] test: fix dependencies between test cases
2023-12-07 16:39:23 +08:00
zeertzjq
1d9ef90115 test: fix dependencies between test cases
Discovered using --shuffle argument of busted.

(cherry picked from commit f273a5a529)
2023-12-07 07:38:08 +00:00
zeertzjq
5c26f463bb
Merge pull request #26443 from neovim/backport-26442-to-release-0.9
[Backport release-0.9] fix(inccommand): save and restore '[ and '] marks
2023-12-07 12:14:01 +08:00
zeertzjq
0fdbb0ea73 fix(inccommand): save and restore '[ and '] marks
Undoing a change moves '[ and '] marks, so it is necessary to save and
restore them.

(cherry picked from commit 8002176c24)
2023-12-07 04:04:20 +00:00
zeertzjq
ffaeaae40a
Merge pull request #26413 from zeertzjq/backport
Backport to release-0.9
2023-12-06 07:45:11 +08:00
zeertzjq
26016ab47a vim-patch:9.0.2151: 'breakindent' is not drawn after diff filler lines
Problem:  'breakindent' is not drawn after diff filler lines.
Solution: Correct check for whether 'breakindent' should be drawn.

closes: vim/vim#13624

588f20dece
2023-12-06 07:24:20 +08:00
Jaehwang Jung
6e05f8afff fix(change): update fold after on_bytes
Problem:
With vim.treesitter.foldexpr, `o`-ing two lines above a folded region
opens the fold. This does not happen with legacy foldexprs. For example,
make a markdown file with the following text (without indentation),
enable treesitter fold, and follow the instruction in the text.

    put cursor on this line and type zoo<Esc>
    initially folded, revealed by zo
    # then this fold will be opened
    initially folded, revealed by o<Esc>

Analysis:
* `o` updates folds first (done in `changed_lines`), evaluating
  foldexpr, and then invokes `on_bytes` (done in `extmark_splice`).
* Treesitter fold allocates the foldinfo for added lines (`add_range`)
  on `on_bytes`.
* Therefore, when treesitter foldexpr is invoked while running `o`, it
  sees outdated foldinfo.

Solution:
`extmark_splice`, and then `changed_lines`. This seems to be the
standard order in other places, e.g., `nvim_buf_set_lines`.
2023-12-06 07:19:11 +08:00
github-actions[bot]
8a4464cd14
[Backport release-0.9] fix: vim.treesitter.get_node() now correctly takes opts.lang (#26382)
[Backport release-0.9] fix(treesitter): allow passing lang to get_node()
2023-12-04 10:03:55 +01:00
zeertzjq
e7dc5dd69e
Merge pull request #26342 from neovim/backport-26341-to-release-0.9
[Backport release-0.9] fix(api): use a conditional stack for nvim_cmd
2023-12-01 14:05:57 +08:00
zeertzjq
2fed9d83bc fix(api): use a conditional stack for nvim_cmd
(cherry picked from commit c0b9bdc4a3)
2023-12-01 05:56:24 +00:00
Gregory Anders
7f74d9bd77
fix: remove nested for_each_tree in TSTreeView (#26331)
Problem:
`LanguageTree:for_each_tree` calls itself for child nodes, so when we
calls `for_each_tree` inside `for_each_tree`, this quickly leads to
exponential tree calls.

Solution:
Use `pairs(child:trees())` directly in this case, as we don't need the
extra callback for each children, this is already handled from the outer
`for_each_tree` call

(cherry picked from commit 0712a4c085)

Co-authored-by: Pham Huy Hoang <hoangtun0810@gmail.com>
2023-11-30 11:04:49 -06:00
zeertzjq
dbe27f45b2
Merge pull request #26313 from zeertzjq/backport
Backport to release-0.9
2023-11-30 08:20:37 +08:00
zeertzjq
18ae9cb35f test: :terminal when 'shell' uses backslashes 2023-11-30 08:00:09 +08:00
Luki446
6a0d19229d fix(terminal): make backslashes in 'shell' work on Windows
If backslashes are used in 'shell' option, escape them to make Terminal
mode work.
2023-11-30 07:58:57 +08:00
zeertzjq
22270ae8e9
test(ex_terminal_spec): unskip tests that work on Windows (#26311) 2023-11-30 07:28:32 +08:00
Christian Clason
76d79c1ce3
Merge pull request #26299 from neovim/backport-26085-to-release-0.9
[Backport release-0.9] fix(treesitter): make InspectTree correctly handle nested injections
2023-11-29 15:34:06 +01:00
Pham Huy Hoang
753f8bcaab fix: make InspectTree handle nested injection
fixup: Use `TSNode:byte_length` instead
(cherry picked from commit 757bcdda30)
2023-11-29 14:17:14 +00:00
zeertzjq
8b9d6e8d63
Merge pull request #26272 from neovim/backport-25726-to-release-0.9
[Backport release-0.9] fix(rplugin): dont create data dir if it's a broken symlink
2023-11-28 19:37:51 +08:00
Samuel (ThinLinc team)
8a85eb7a21 fix: dont create data dir if it's a broken symlink
Checking if it's non-empty and not a directory gets us quite far, but
not all the way. While a working symlink would trigger the earlier
checks, a broken symlink does not.

This commit fixes the special case where ~/.local/share/nvim  already
exists but is a broken symlink. Thus, it fixes the following error on
startup:

E739: Cannot create directory /home/samuel/.local/share/nvim: file
already exists

(cherry picked from commit a6051e68a3)
2023-11-28 11:27:28 +00:00
zeertzjq
57f1bc34fc
Merge pull request #26210 from neovim/backport-26203-to-release-0.9
[Backport release-0.9] fix(oldtest): always use a 64-bit int for swapfile block number
2023-11-25 20:25:53 +08:00
James McCoy
66edb17b13 fix(oldtest): always use a 64-bit int for swapfile block number
09d4133 changed blocknr_T from long to int64_t, so pe_bnum is now always 64-bit.  This was an incompatible change in the swapfile format for 32-bit systems, but there have been no complaints in the past 9 years so just adjust the test.

(cherry picked from commit a1ded1b113)
2023-11-25 12:14:19 +00:00
James McCoy
0107243aaf
Merge pull request #26205 from jamessan/nlua_error-crash
fix(lua): crash in nlua_error
2023-11-25 07:07:44 -05:00
zeertzjq
6eecba3760
Merge pull request #26206 from neovim/backport-26201-to-release-0.9
[Backport release-0.9] fix(mouse): avoid dragging when clicking next to popupmenu
2023-11-25 07:21:04 +08:00
Luuk van Baal
a27e683ca5 fix(mouse): avoid dragging when clicking next to popupmenu
(cherry picked from commit bce65ee429)
2023-11-24 23:10:41 +00:00
James McCoy
98fbe3b09a
fix(lua): crash in nlua_error
Backport fix hidden in bd4ff0b88, by actually using the `msg` parameter,
rather than trying to print a potentially null `str`.
2023-11-24 16:43:41 -05:00
zeertzjq
07860aba75
Merge pull request #26188 from neovim/backport-26187-to-release-0.9
[Backport release-0.9] fix(mouse): avoid dragging after click label popupmenu callback
2023-11-24 09:27:28 +08:00
Luuk van Baal
2640ad0057 fix(mouse): avoid dragging after click label popupmenu callback
(cherry picked from commit c9be619f28)
2023-11-24 01:16:09 +00:00
zeertzjq
4065e2e3bd
Merge pull request #26186 from neovim/backport-26185-to-release-0.9
[Backport release-0.9] docs(starting.txt): correct step number
2023-11-24 07:29:39 +08:00
zeertzjq
900772f8eb docs(starting.txt): correct step number
(cherry picked from commit ba513b7438)
2023-11-23 23:19:25 +00:00
zeertzjq
ed6684ba99
Merge pull request #26178 from neovim/backport-26177-to-release-0.9
[Backport release-0.9] perf: remove redundant strlen in skipwhite
2023-11-24 05:43:28 +08:00
ii14
35ef7ac651 perf: remove redundant strlen in skipwhite
skipwhite was iterating over the input twice and scanning for the null
byte character with strlen. this is redundant, because it's already
covered by ascii_iswhite that accepts only space or tab character.

(cherry picked from commit b4743dfefa)
2023-11-23 21:26:50 +00:00
zeertzjq
c86be03216
Merge pull request #26161 from zeertzjq/backport
Backport to release-0.9
2023-11-23 16:52:54 +08:00
zeertzjq
3ed71c250c vim-patch:9.0.0598: using negative array index with negative width window
Problem:    Using negative array index with negative width window.
Solution:   Make sure the window width does not become negative.

8279af514c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-11-23 15:58:19 +08:00
zeertzjq
cc8837db46 vim-patch:9.0.0492: cmdwin test fails on MS-Windows
Problem:    Cmdwin test fails on MS-Windows.
Solution:   Skip test on MS-Windows.

312af65d1a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-11-23 15:58:14 +08:00
zeertzjq
d6f3b7bec7 vim-patch:9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Problem:    Using freed memory with cmdwin and BufEnter autocmd.
Solution:   Make sure pointer to b_p_iminsert is still valid.

1c3dd8ddcb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-11-23 15:58:09 +08:00