libtool, autoconf, automake and perl are no longer dependencies of
neovim and doesn't need to be installed in CI anymore. The dependencies
and the commit that removed them as dependencies are the following:
libtool: b05100a9ea
perl: 20a932cb72
autoconf+automake: e23c5fda0a
Problem: Mapping related function in wrong source file.
Solution: Move the function. Add a few more test cases. (Yegappan
Lakshmanan, closesvim/vim#5528)
7f51bbe0d1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: :messages behavior depends on 'fileformat' of current buffer.
Solution: Pass the buffer pointer to where it is used. (Mirko Ceroni,
closesvim/vim#11995)
1d87e11a1e
Co-authored-by: cero1988 <mirkoceroni@mirkoceroni.it>
Libuv's recent changes in their pc file breaks cmake; they are using
-l:libuv.a for the linker, and it seems cmake can't resolve that.
Prefer using their cmake config file instead instead, and use the find
module as a fall-back in case it fails.
Closes https://github.com/neovim/neovim/issues/22271.
When using a multi config generator, CMake generates an output file for
each configuration when using file(GENERATE). When the contents of the
file for each configuration are different, CMake fails. Instead, create
separate files for each configuration and add a build time step to copy
the configuration specific file to the generic path "auto/versiondef.h"
which is included at build time.
Problem:
The Lua-API bridge allows Dict params to be empty Lua (list) tables at
the function-signature level. But not for _nested_ Dicts, because they
are not modeled:
fae7540732/src/nvim/api/keysets.lua (L184)
Some API functions like nvim_cmd check for kObjectTypeDictionary and
don't handle the case of empty Lua tables (treated as "Array").
Solution:
Introduce VALIDATE_T_DICT and use it in places where
kObjectTypeDictionary was being checked directly.
fixes#21005
This commit implements the ability to control all of the XDG paths
Neovim should use. This is done by setting an environment variable named
NVIM_APPNAME. For example, setting $NVIM_APPNAME makes Neovim look for
its configuration directory in $XDG_CONFIG_HOME/$NVIM_APPNAME instead of
$XDG_CONFIG_HOME/nvim.
If NVIM_APPNAME is not set or is an empty string, "nvim" will be used as
default.
The usecase for this feature is to enable an easy way to switch from
configuration to configuration. One might argue that the various $XDG
environment variables can already be used for this usecase. However,
setting $XDG environment variables also affects tools spawned by Neovim.
For example, while setting $XDG_CONFIG_HOME will enable Neovim to use a
different configuration directory, it will also prevent Git from finding
its "default" configuration.
Closes https://github.com/neovim/neovim/issues/21691
Problem: Reallocating the list of scripts is inefficient.
Solution: Instead of using a growarray of scriptitem_T, store pointers and
allocate each scriptitem_T separately. Also avoids that the
growarray pointers change when sourcing a new script.
21b9e9773d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Info about sourced scripts is scattered.
Solution: Use scriptitem_T for info about a script, including s: variables.
Drop ga_scripts.
7ebcba61b2
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cursor position wrong when splitting window in insert mode.
Solution: Pass the actual mode to win_fix_cursor(). (Luuk van Baal,
closesvim/vim#11999,
bc3dc298b3
Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
Problem: Scrolling two lines with even line count and 'scrolloff' set.
Solution: Adjust how the topline is computed. (closesvim/vim#10545)
1d6539cf36
Cherry-pick test_scroll_opt.vim changes from patch 8.2.1432.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
ci: add GCC release testing
We currently have no release testing, so it's good to check for any
unwanted behavior on release builds as well. Prefer GCC over clang, as
GCC release builds seem to create more warnings on release compared to
debug.
According to [AppStream spec](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic),
the <id> element should contain a reverse-DNS scheme:
{tld}.{vendor}.{product}
Since the flathub requires that, the flatpak build replaces `<id>nvim</id>` with
`<id>io.neovim.nvim</id>`. That results in ID mismatch between flatpak version
and version from distribution's repositories. Because of that, software stores
are displaying two different neovims, instead of one neovim with options to
download it either from flatpak or from distribution's repos. We can use the
`<provides><id>nvim</id></provides>`, for everyone who was expecting the id to
be `nvim`.
Problem: After TUI refactor commit, code for setting Windows taskbar
icon wasn't being executed because of a backdated conditional.
Solution: Update the conditional to take TUI refactor into account.
Ref: https://github.com/neovim/neovim/pull/20634#discussion_r1088993820
This variable was only meant for easy testing during the development
cycle for treesitter highlighting while Lua was the only parser useable
for daily driving. Now that we have a good vimdoc parser, this approach
simply doesn't scale and should be removed sooner rather than later.
Instead of setting this variable, people for now should add the autocommand
directly to their config:
```lua
vim.api.nvim_create_autocmd('FileType', {
pattern = 'lua', -- or { 'lua', 'help' }
callback = function() vim.treesitter.start() end,
})
```
(or put `vim.treesitter.start()` in an `ftplugin`).
This fixes two clang warnings.
Using an unintialized "cursorline_fi" without assigning to it is not
something that should normally happen, and in case it happens it will
likely cause another redraw, but still don't use unintialized memory.
Problem:
The sleep before collecting the initial screen state is confusing and
may lead to unexpected success if it comes after a blocking RPC call.
Solution:
Remove that sleep and add an "intermediate" argument.
Problem:
Validation messages are not consistently formatted.
- Parameter names sometimes are NOT quoted.
- Descriptive names (non-parameters) sometimes ARE quoted.
Solution:
Always quote the `name` value passed to a VALIDATE macro _unless_ the
value has whitespace.
Problem: uv_tty_set_mode on stdout in Windows exits with error.
Cause: Windows cannot set the properties of the output of a tty.
Solution: Remove call to uv_tty_set_mode.
Ref: #21445
Ref: 88634c1405 (r100598822)
In Windows, library DLL's are copied in the building process, and a message for each copy is printed. This is useful to have in the log of CI, but annoying to see when you're building and rebuilding nvim constantly. Work around this issue by only enabling the messages on CI.
Problem:
- API validation involves too much boilerplate.
- API validation errors are not consistently worded.
Solution:
Introduce some macros. Currently these are clumsy, but they at least
help with consistency and avoid some nesting.
Problem: The cursorline highlight logic checks for `w_cursor.lnum`
which may be different from the line number passed to
`win_line()` even when the cursor is actually on that line.
Solution: Update cursor line highlight logic to check for the line
number of the start of a closed fold if necessary.