Problem: Left (`<` prefix) and right (`>` prefix) parts of update
changelog come in not fixed order: it can be left-right or right-left.
Solution: Ensure left-right order.
Problem: New version suggestions in update confirmation buffer might
include semver tags that were committed later but for versions that
are not greater than current. Like if versions committed in order
`v0.2.0` - `v0.3.0` - `v0.2.1` - `v0.3.1`, then when on `v0.3.0` both
`v0.2.1` and `v0.3.1` are suggested, but only the latter is newer as
a version. This is because those tags are computed with post-processed
`git tag --list --contains HEAD`.
Solution: Compute all semver tags and filter only those greater than the
latest version available at HEAD.
Problem: Both `PackChangedPre` and `PackChanged` contain |event-data|
with plugin's `spec`. It looks like a good idea to have all its
triggers contain the same format across all kinds ("install",
"update", "delete"). There are several choices:
- Have it be as verbatim as supplied to `vim.pack.add()`, i.e. can
be either string or table. A bit too ambiguous.
- Have it be table with `src` and `name` inferred. This requires
less work for "install", but more work for "update" and "delete"
(since they use `vim.pack.get()` which already infers default
`version`).
- Have it be table with *all* defaults made explicit. This looks
like the best approach, but requires extra care to only infer
default `version` when needed (i.e. avoid inferring during regular
load) because it is costly in terms of startup time.
This might also introduce inconsistency when dealing with
lockfile(s) as information there should be as close to what user
supplied as possible. Address that when dealing with lockfile.
Solution: Ensure explicit `version` in all events where possible.
Problem: Currently `update()` and `del()` silently ignore input plugin
names that are not for already installed plugin. This might lead to
confusion because they are not explicitly reported.
Solution: Check that all input names are for installed plugins and error
otherwise.
Problem: using `print()` to show progress report writes to `stdout` when
in `--headless` mode (interferes with the testing output) and doesn't
allow coloring.
Solution: use `nvim_echo` with colored chunks.
Problem: Sourcing of 'after/plugin' scripts depends on the value of
'loadplugins' option. It is redundant, as it has effect only during
startup, while it is combined with `vim.v.vim_did_enter == 1` (i.e.
"it is after starting up") condition.
Solution: Ignore it.
Problem: `attempt to yield across metamethod/C-call boundary` error when
trying to use `vim.pack.add()`.
Solution: use `pcall()` variant from 'coxpcall' on non-LuaJIT version of
Lua.
Ensure :map (and :abbreviate) terminate at | when included in :command
replacement strings containing commands separated by line continuations.
b88f9e4a04
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This workarounds a bug likely in nvim__get_runtime, and fixes#35124
Though I'd argue it is more correct anyway as the point of
vim.SUBMODULE lazy loading is "only pay for what you use". If no one
has require'vim.diagnostic' yet in LSP or otherwise, there cannot
be any diagostics available and loading the lua module is wasteful.
Problem: Visual block insert on a single line incorrectly triggers two
on_lines callbacks - one for the correct line (0-indexed) and another
for a non-existent additional line.
Solution: Only call changed_lines() in block_insert() when additional
lines beyond the first were actually modified (start.lnum < end.lnum).
Problem:
It's relatively easy to mispress key `a` to (a)llow arbitrary execution
of 'exrc' files. #35050
Solution:
- For exrc files (not directories), remove "allow" menu item.
Require the user to "view" and then explicitly `:trust` the file.
Problem:
diagnostic extmark used for positioning continues to exist after
deleting a range containing it, so it's possible to jump to a
next/previous diagnositc, which isn't visible in any way, including not
being shown via `open_float`.
Solution:
enable `invalidate` flag when setting an extmark to be able to filter
out diagnostics based on `invalid` flag when looking for next/previous
diagnostic to jump to.
When right_gravity is set to true for deactivating tabstop expansion we
have to set end_right_gravity to false to avoid expanding the tabstop
region on the right side. Vice versa for activating tabstop expansion
again.
Problem:
When setting extmark for a codelens after it's asynchronously resolved,
the line may have been removed, raising "invalid 'line': out of range"
error. This is a regression from #34888.
Solution:
Re-introduce the line count check.
Problem:
Diagnostic positions are not being updated after text changes, which
means `vim.diagnostic.open_float` and `vim.diagnostic.jump` will work
with outdated positions when text is changed until diagnostics are
updated again (if ever).
Solution:
Create extmarks in `vim.diagnostic.set` and use their positions for
`vim.diagnostic.open_float` and `next_diagnostic` (used by
`vim.diagnostic.jump`, `vim.diagnostic.get_next` and
`vim.diagnostic.get_prev`).
Problem: :term splits new window above in vim, but in nvim it change
the buffer for current window
Solution: :hor term to ensure consistent splitting for Vim and Neovim
closes: vim/vim#17822714671de35
Co-authored-by: phanium <91544758+phanen@users.noreply.github.com>
Problem: GTK code can be improved
Solution: Improve GTK code for initial Wayland support
(lilydjwg)
related: vim/vim#963994ff09a093
vim-patch:9.1.1453: tests: Test_geometry() may fail
Problem: tests: Test_geometry() may fail
(Gary Johnson)
Solution: allow a slightly smaller value when checking the number of
lines.
fixes: vim/vim#17491e965b7ac5f
Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: lilydjwg <lilydjwg@gmail.com>
Problem:
":restart" always executes ":qall" to exit the server.
Solution:
Support ":restart +cmd" so the user can control the command
used to exit the server.
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Problem:
Vimscript functions return number to signal ok/error. Lua doesn't
convert these to be falsey.
Solution:
Explicitly check if the return value is 0.