Commit Graph

25947 Commits

Author SHA1 Message Date
zeertzjq
3a80c6ad18 ci(lintcommit): allow colon not followed by space in description
(cherry picked from commit 6ddb775a2e)
2024-01-01 11:11:46 +01:00
dundargoc
95bead71b3 build: remove LOG_LIST_ACTIONS option and related code
It has not been used for a long time and the likelihood of it working
isn't high.

(cherry picked from commit 5100fe263f)
2023-12-30 19:10:29 +01:00
dundargoc
89ae281365 build: enable ASAN for MSVC
It is enabled with ENABLE_ASAN_UBSAN like other compilers. Technically
it only enables ASAN as UBSAN is not available, meaning to make the
variable names fully correct we'd need to separate it into two checks:
ENABLE_ASAN and ENABLE_UBSAN, but the convenience of combining them into
the same flag outweighs the theoretical correctness.

Also note in CONTRIBUTING.md that debug builds in ASAN is not supported.
Technically it is the debug runtime that is not supported, which cmake
automatically enables when using the debug build type. However, neovim
can't be built with debug builds without linking to the debug runtime
since the third party libraries has likely been linked to the debug
runtime if it was built with debug build type. This technicality is
likely uninteresting to the potential developer and it's easier to just
say to use a release build type.

(cherry picked from commit ef311fcd12)
2023-12-30 19:08:07 +01:00
Christian Clason
9bce28ab79 test(functional): remove faulty pending check
Problem: `functional/vimscript/api_functions_spec` skips a test if the
runtime files are not generated, but this check was broken in a
refactor.

Solution: Since runtime files are now generated for all test targets, do
not skip this test.

(cherry picked from commit 2df8a81e21)
2023-12-30 19:07:21 +01:00
dundargoc
bba1d6dd79 build: use -O3 optimization for release builds
Compilers have much more reliable -O3 output these days, so this
workaround is likely not needed.

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

(cherry picked from commit 1e65ecf8c7)
2023-12-30 18:43:29 +01:00
dundargoc
33bbde1bc6 build: add more runtime files to test dependencies
Equivalent to some of the changes in
bf0be0f63e.
2023-12-30 18:07:47 +01:00
bfredl
b84ede36ba version bump 2023-12-30 14:22:05 +01:00
bfredl
8744ee8783 NVIM 0.9.5
This is a maintenance release, focusing on bugfixes.
Notably, fixes were made for using and testing Nvim on less
common platforms, like big endian systems.

BUG FIXES
- defaults: Set 'fsync'
- Dont create data dir if it's a broken symlink
- Make InspectTree handle nested injection
- Remove nested for_each_tree in TSTreeView
- api: Use a conditional stack for nvim_cmd
- change: Update fold after on_bytes
- deps: Bump libmpack from luarocks
- extmark_to_array: Convert conceal_char to bytes
- highlight: Apply 'winblend' to float border
- inccommand: Save and restore '[ and '] marks
- inccommand: Don't crash with "split" and 'n' flag
- lsp: Handle NUL bytes in popup text
- lua: Correct return value for on_key with no arguments
- lua: Crash in nlua_error
- man: Make :Man with a range work
- mappings: Fix mapset() not replacing map with backslash
- marks: Handle switching buffer properly
- mouse: Avoid dragging after click label popupmenu callback
- mouse: Avoid dragging when clicking next to popupmenu
- move: Check the correct buffer
- options: Setting 'scroll' with resized grid
- quickfix: Check if delete failed in qf_fill_buffer()
- set_bool_option: Use int value to make bool Object
- set_option_from_tv: Use v_bool to access boolean option
- terminal: Assign channel to terminal earlier
- terminal: Avoid Insert mode in Terminal buffer
- terminal: Don't lose focus on <MouseMove>
- terminal: Keep focus when scrolling number column of another window
- terminal: Make backslashes in 'shell' work on Windows
- treesitter: Foldexpr tweaks
- treesitter: Remove incompatible c query (again)
- ui: Empty line before the next message after :silent command

BUILD SYSTEM!
- Fix universal mac builds
- ci: Ensure correct headers are used on macOS

DOCUMENTATION
- List NVIM_APPNAME as env on manpage
- starting.txt: Correct step number

PERFORMANCE
- Remove redundant strlen in skipwhite

TESTING
- Fix dependencies between test cases and test flakiness
2023-12-30 14:18:40 +01:00
dundargoc
7348cc3a5b ci: add workflow_dispatch to optional.yml workflow
This makes it convenient to test optional.yml on release branch.
2023-12-29 20:02:43 +01:00
dundargoc
130bfe22c8 ci: disable libintl on mac release
The releases doesn't work on intel mac as libintl isn't available on the system
by default. This makes `:language` not work for the shipped macos releases,
though the reduction in build system complexity most likely outweighs that.
2023-12-27 00:01:28 +01:00
Carlo Cabrera
0496e1e889 build(ci): ensure correct headers are used on macOS
Currently, the release build picks up headers in
`/Library/Frameworks/Mono.framework/Headers`. You can verify this by
downloading the latest nightly build and checking the output of `nvim
--version`.

These headers are likely to be from a different version of `libintl` than the
one we link to. Let's avoid usage of them by setting `CMAKE_FIND_FRAMEWORK` to
`NEVER`.
2023-12-27 00:01:28 +01:00
dundargoc
84804e9afd ci: remove winget workflow
All releases that aren't directly maintained by us should live in the
`neovim/neovim-releases` repository to make it clear that neovim isn't
directly responsible for it and to correctly manage expectations that
it's provided on a best-effort case.

Closes https://github.com/neovim/neovim/issues/26717.
2023-12-26 22:43:39 +01:00
Vedant
da4eda6e9c ci(release/winget): get msi from previous job instead of downloading 2023-12-26 22:18:40 +01:00
zeertzjq
450c6d7584
Merge pull request #26720 from neovim/backport-26719-to-release-0.9
[Backport release-0.9] fix(mappings): fix mapset() not replacing map with backslash
2023-12-23 15:40:27 +08:00
zeertzjq
d414938163 fix(mappings): fix mapset() not replacing map with backslash
(cherry picked from commit 5ac9b4cddf)
2023-12-23 07:31:01 +00:00
zeertzjq
2c3aca4205
Merge pull request #26680 from zeertzjq/backport
Backport to release-0.9
2023-12-20 22:52:06 +08:00
zeertzjq
c6d127f3a4 ci(release): create version tag after "stable" tag 2023-12-20 22:15:52 +08:00
zeertzjq
ea748157e1 fix(options): setting 'scroll' with resized grid 2023-12-20 22:15:52 +08:00
zeertzjq
20bd03f166 test: make text-only snapshots work 2023-12-20 22:15:52 +08:00
zeertzjq
c2249f6abf test: allow avoiding repeated screen lines in expected states
Allow a "*count" suffix in a screen line to repeat the screen line for
"count" times.

The change is made to Screen:expect() and Screen:get_snapshot() instead
of Screen:render() so that screen expectations generated using code can
still work and test failures can still be readable.

A snapshot is now also printed on failure so that there is no need to
run the test again with Screen:snapshot_util().
2023-12-20 22:15:51 +08:00
James McCoy
8813b68a9b
Merge pull request #26644 from jamessan/big-endian-fixes
Big-endian CI backport and fixes
2023-12-20 09:08:06 -05:00
zeertzjq
1bb3f74f1e
Merge pull request #26662 from neovim/backport-26660-to-release-0.9
[Backport release-0.9] vim-patch:9.0.2178: reg_executing() wrong for :normal with range
2023-12-20 05:41:16 +08:00
zeertzjq
e25cce5f71 vim-patch:9.0.2178: reg_executing() wrong for :normal with range
Problem:  reg_executing() returns wrong result in :normal with range
          when 'showcmd' is set (after 8.2.4705).
Solution: Reset "pending_end_reg_executing" when executing a register.

closes: vim/vim#13707

615202bd0e
(cherry picked from commit 2d1143f285)
2023-12-19 21:27:37 +00:00
James McCoy
13f8bc4257
fix(extmark_to_array): convert conceal_char to bytes
conceal_char is the codepoint of the character.  Using it directly as
the string isn't valid if the character is non-ascii or on big-endian
systems.
2023-12-19 07:38:11 -05:00
James McCoy
ad8bd45207
fix(set_option_from_tv): use v_bool to access boolean option 2023-12-19 07:38:11 -05:00
James McCoy
92d620ad92
fix(set_bool_option): use int value to make bool Object
Boolean options are stored in an int, not a char, so dereferencing
"char *varp" is not portable to big-endian systems.
2023-12-19 07:38:11 -05:00
James McCoy
150f2b274d
ci(s390x): run build & test as a non-root user
(cherry picked from commit 3d8cd0c5d3)
2023-12-19 07:38:10 -05:00
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