Commit Graph

25968 Commits

Author SHA1 Message Date
zeertzjq
0ef27180e3
Merge pull request #27088 from zeertzjq/backport
Backport to release-0.9
2024-01-19 12:10:31 +08:00
zeertzjq
26f8365864 fix(inccommand): improve preview buffer number handling (#27087) 2024-01-19 11:25:40 +08:00
zeertzjq
773877e024 vim-patch:9.1.0040: issue with prompt buffer and hidden buffer (#27071)
Problem:  Modifying a hidden buffer still interferes with prompt buffer
          mode changes.
Solution: Save and restore b_prompt_insert.
          (zeertzjq)

closes: vim/vim#13875

Modifying hidden buffer still interferes with prompt buffer mode changes

f267847017
2024-01-19 11:16:44 +08:00
zeertzjq
d5e1bc5706 vim-patch:9.1.0033: Insert mode not stopped if closing prompt buffer modifies hidden buffer (#27051)
Problem:  Insert mode not stopped if an autocommand modifies a hidden
          buffer while closing a prompt buffer.
Solution: Don't set b_prompt_insert if stop_insert_mode is already set.
          (zeertzjq)

closes: vim/vim#13872

96958366ad
2024-01-19 11:14:25 +08:00
zeertzjq
bf4b805516 fix(edit): don't go to Terminal mode when stopping Insert mode (#27033) 2024-01-19 11:13:39 +08:00
zeertzjq
f58c613508
Merge pull request #27030 from neovim/backport-27029-to-release-0.9
[Backport release-0.9] vim-patch:8.1.1968: crash when using nested map()
2024-01-16 10:41:43 +08:00
zeertzjq
51f8668cbd vim-patch:8.1.1968: crash when using nested map() (#27029)
Problem:    Crash when using nested map().
Solution:   Clear the pointer in prepare_vimvar(). (Ozaki Kiichi,
            closes vim/vim#4890, closes vim/vim#4891)

27da7de7c5

Cherry-pick Test_filter_map_nested() from patch 8.1.1964.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit a34451982f)
2024-01-16 01:33:16 +00:00
zeertzjq
7c66923211
Merge pull request #26976 from neovim/backport-26975-to-release-0.9
[Backport release-0.9] fix(pum): handle right-click menu repositioning with multigrid
2024-01-10 13:09:04 +08:00
zeertzjq
9d31b58861 fix(pum): handle right-click menu repositioning with multigrid (#26975)
(cherry picked from commit a7550a20e0)
2024-01-10 04:57:29 +00:00
github-actions[bot]
f2caaad78e
[Backport release-0.9] fix(tui): use buflen to calculate remaining buffer size (#26943)
fix(tui): use buflen to calculate remaining buffer size (#26942)

buf is a pointer argument, not a local char array, so sizeof(buf) is just the size of a pointer type on the platform.  This is always an incorrect value, but on 32-bit platforms it actually has an impact, since sizeof(buf) is just 4 and causes the buffer to get truncated.

(cherry picked from commit 367e52cc79)

Co-authored-by: James McCoy <jamessan@jamessan.com>
2024-01-07 14:59:20 -05:00
James McCoy
5fe8029cf3
Merge pull request #26920 from jamessan/backport-26913-to-release-0.9
[Backport release-0.9] fix(test/tui_spec): pass the expected NULL-sentinel to execl()
2024-01-06 10:05:19 -05:00
James McCoy
94deea8da0
fix(test/tui_spec): pass the expected NULL-sentinel to execl()
Since execl() is a variadic function, it requries a NULL-terminal to
indicate the end of its argument list, c.f. exec(3)

> The first argument, by convention, should point to the filename
> associated with the file being executed.  The list of arguments *must*
> be terminated by a null pointer

This fixes the failure seen on aarch64 and i386, due to garbage data
being considered part of the variadic arguments.

(cherry picked from commit 8861ad83fd)
2024-01-06 09:45:05 -05:00
James McCoy
0aab111c6c
Merge pull request #26907 from jamessan/backport-26905-to-release-0.9
[Backport release-0.9] fix(test): call separate_arguments() correctly to honor $BUSTED_ARGS (#26905)
2024-01-05 14:49:59 -05:00
James McCoy
77ecdb7ec9
fix(test): call separate_arguments() correctly to honor $BUSTED_ARGS (#26905)
separate_arguments() doesn't operate in place on a variable.  It expects
a string argument to parse and stores the results in the specified
variable.

(cherry picked from commit 52e6059415)
2024-01-05 14:28:20 -05:00
bfredl
24edeec6d8
Merge pull request #26896 from neovim/backport-25602-to-release-0.9
[Backport release-0.9] refactor(lang): reduce scope of HAVE_WORKING_LIBINTL #ifdefs
2024-01-05 09:25:21 +01:00
bfredl
5d89da962d refactor(lang): reduce scope of HAVE_WORKING_LIBINTL #ifdefs
A lot of code inside HAVE_WORKING_LIBINTL doesn't really depend on a
"working libintl". For instance ex_language is also used for ":lang collate"
and ":lang time".

Also ":lang C" should not fail just because translations aren't available (it
just means use the default text).

References:

https://github.com/neovim/neovim/pull/1 2d00ead2e5
separate ifdefs for locale and gettext got merged together.

8253e29971
Unmotivated switcharoo of get_mess_env() logic. If available, get_locale_val(LC_MESSAGES) is the correct implementation.

(cherry picked from commit 3a44db510b)
2024-01-05 07:56:57 +00:00
zeertzjq
bb5359bf75
Merge pull request #26893 from neovim/backport-26892-to-release-0.9
[Backport release-0.9] fix(terminal): check if mouse on statusline/tabline/winbar/vsep
2024-01-05 11:20:33 +08:00
zeertzjq
97eed79846 fix(terminal): check if mouse on statusline/tabline/winbar/vsep (#26892)
(cherry picked from commit e09adfdcff)
2024-01-05 03:00:12 +00:00
Gregory Anders
b587aff176
fix(health): fix tmux RGB capability detection (#26886) (#26887)
tmux indicates its RGB support via setrgbb and setrgbf. In modern tmux
code, Tc and RGB just set setrgbb and setrgbf, so we can just check for
them.

Link: 7eb496c00c

(cherry picked from commit 88eb0ad149)

Co-authored-by: Tristan Partin <tristan@partin.io>
2024-01-04 18:15:04 -06:00
Tom Blake
ea3966aac9 fix: checkhealth warning even if init.lua exists #25306
Problem:
`:checkhealth nvim` warns about missing vimrc if `init.lua` exists but
`init.vim` does not.

Solution:
Check for any of: init.vim, init.lua, $MYVIMRC.
Fix #25291

Backport of https://github.com/neovim/neovim/pull/25306
2024-01-03 13:47:40 +01:00
dundargoc
3a535ff496 feat(vim.deprecate): only issue warning if neovim version is high enough
As specified by MAINTAIN.md, features should be soft deprecated at first
(meaning no warnings) to give people a chance to adjust. The problem
with this approach is that deprecating a feature becomes harder than
usual as during the soft deprecation period you need to remember not to
issue a warning, and during the hard deprecation period you need to
remember to start issuing a warning.

This behavior is only enforced if the `plugin` parameter is `nil` as
plugins may not want this specific behavior.

(cherry picked from commit 0a598c13b1)
2024-01-03 13:28:47 +01:00
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