Problem:
Client:_get_registrations() errors if a documentSelector pattern is not
a valid glob (e.g. "**/**.dart" from dartls). The error discards
already-matched registrations and propagates to supports_method() and
the client/registerCapability handler, disabling capabilities unrelated
to the offending pattern.
Solution:
Skip invalid globs. Treat them as non-matching, and log once per client.
(Similar approach was taken for filewatcher globs: 4d9e5acfb5)
It's necessary to copy the global 'fileencoding' to the buffer-local
value before entering the buffer, otherwise 'fileencoding' is changed
when reading the file, which will mark the file as modified.
Problem: transstr() appends with STRCAT()/STRLEN() from the start of
the result on every iteration, making it quadratic to the
length of the string.
Solution: Keep a tail pointer and append at it. (Samuel Schlesinger).
closes: vim/vim#20925124c86868c
Co-authored-by: Samuel Schlesinger <sgschlesinger@gmail.com>
Problem: "zb" scrolls incorrectly with cursor just above fold.
Solution: Handle boff.lnum being set to the last line of a fold
(zeertzjq).
With the cursor just above fold, botline_forw() moves boff.lnum to the
last line of the fold, but curwin->w_botline is at the first line of the
fold, so the boff.lnum == curwin->w_botline condition never holds.
Instead, check that boff.lnum has just moved to or past w_botline by
comparing its previous value with w_botline.
Also make a similar change to the loff.lnum check above for symmetry.
That one doesn't change behavior, as topline_back() sets loff.lnum to
the first line of a fold.
related: neovim/neovim#41122
closes: vim/vim#20923aee686334c
Problem:
`zipfile://{archive}::{entry}` is ambiguous: `::` is legal in both an
archive path and an entry path, so the separator cannot be identified.
Splitting at the last `::` reads archives correctly but breaks entries
that contain it, and the plugin then emits buffer names it cannot read
back.
Solution:
Address entries as `zip://{archive}/{entry}`, joining the two paths.
Resolve the split by walking components: the first one that is a regular
file is the archive, because a regular file cannot have children on disk.
Entry paths may then contain any character, and no escaping is needed.
zipPlugin.vim keeps its own scheme, so the Java ftplugin emits whichever
form matches the active plugin until the legacy package is removed.
Problem:
Windows searches the current directory before $PATH, so opening an archive
in a directory that also contains an `unzip` executable runs that one. The
legacy plugin refused this; the port dropped the check.
Solution:
Refuse to run `unzip` when it resolves to the current directory.
Problem: An error raised after the list handler ran (e.g. while
rendering) unwinds through the pcall around provider.list()
and is routed back into the now no-op handler: silently
discarded.
Solution: Re-raise the error when the handler has already run.
Problem: A failed initial directory listing discards the listing state:
the user is left in an empty modifiable non-listing buffer, and
the BufEnter autocmd retries the failing open, repeating the
error on every re-entry.
Solution: Render the failure as an empty listing with state and handlers
intact: the error is reported once and "R" or :edit retries the
listing. Keep the error on the listing state so a failed
listing is distinguishable from an empty one; the next list
clears it.
Problem:
There is no health check. Encrypted entries cannot be read at all, since
Info-ZIP takes a password only from a terminal and `-P` would expose it
in the process arguments.
Solution:
Add `:checkhealth nvim.zip`, reporting the backend and which
implementation is handling archives. Prompt for the password on a pty,
extracting to a file so the entry's bytes stay off the terminal. Report
Info-ZIP's exit code rather than inferring a cause, so an archive using
AES is not reported as a failed decryption.
Problem:
'breakindent' and 'showbreak' draw their own padding with no
reference to whatever decoration or syntax highlight is currently
active, so it goes unhighlighted even mid-highlight, not just past a
real EOL. Gating this on the decoration's `hl_eol` flag (as an
earlier version of this fix did) missed plain highlights with no
`hl_eol` at all, which have the exact same problem.
Solution:
Snapshot decor_attr into decor_attr_save right before it can be
reset by 'linebreak' filler handling, and pass it into
handle_breakindent()/handle_showbreak_and_filler() to extend into
their padding: it is not a real end of the highlight, just screen
cells with no buffer text. Like the 'linebreak' filler, an
underline/strikethrough/overline is excluded, since it looks like a
broken line drawn over the gap. This also fixes 'breakindent' losing
the highlight right after a real 'linebreak' word-push, since that
reset otherwise leaked into the next row.
Problem:
ui2 clears the substitute confirmation match when it updates its prompt buffer with hlsearch disabled.
Solution:
Only invalidate the match highlight when the current buffer changes.
* build(vim-patch): n/a func in version.c
init_longVersion() sets datetime for ":version".
Nvim removed it for more deterministic builds.
* build(vim-patch): n/a header from amiga
* build(vim-patch): n/a vim9 err msg for declaring vars
* build(vim-patch): nvim support.txt replaces *os-support*
* build(vim-patch): vim xdg is n/a
* build(vim-patch): n/a 1-line err msg
Vim error message can be 1-line (globals.h), not multi-line (errors.h).
Target v8.2.1032
Problem:
When 'linebreak' pushes a word entirely to the next screen row, the
filler cells left on the current row keep whatever highlight was set
by the last real character before the break, even when that highlight
should not extend past it (e.g. an underline, which looks broken drawn
over blank cells).
Solution:
Reset decor_attr and area_attr at the filler when their attribute has
an underline, undercurl, strikethrough, or overline; otherwise leave
them, since a plain background or reverse-video highlight looks
correct extending through blank filler cells, regardless of where the
pushed-down word happens to end. search_attr keeps the same check,
plus its pre-existing on_last_col case (its own match ending exactly
here).
Problem: On MS-Windows, get_cmd_output() removes its reserved temporary
file before the shell opens it, allowing another Vim process to
reuse the same name.
Solution: Keep the temporary file reserved until command output handling is
complete (Sam Roeca).
closes: vim/vim#209150db0c3c142
Co-authored-by: Sam Roeca <samuel.roeca@gmail.com>
Problem: The test comparing the top line before and after using the
autocommand window is flaky in the GUI.
Solution: Run the test in a window with a fixed size. In the GUI a
pending resize of the shell is applied at the end of a screen
update, thus the size may change between the two measurements.
related: vim/vim#20884
closes: vim/vim#2091385b8034dff
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Introduce an initial browser-based Neovim demo with automatic startup and UI integration. The demo is functional but still requires persistence, additional testing, and further stabilization.
Acknowledgment: UiState in app.js is based on the implementation from github.com/MuNeNiCK/nvim-wasm, with additional modifications and updates
Problem:
Calling vim.treesitter.start() a second time on a buffer that already
has an active TSHighlighter creates a brand new instance instead of
reusing it, whether the parser tree is unchanged (e.g. calling start()
twice) or different (e.g. switching languages). Either way the old
instance is silently discarded without calling :destroy() on it, so
its on_bytes/on_changedtree/on_detach callbacks stay registered and
its buffer-local state (spelloptions, decoration namespace) is never
restored, both leaking indefinitely for an orphaned instance that
nothing references anymore.
Solution:
Return the existing instance when TSHighlighter.active[source] is
already set for the same parser tree, instead of unconditionally
constructing a new one. When the tree differs instead (e.g. a language
switch), destroy() the old instance first, matching stop() semantics,
before constructing the new one.
FreeBSD and OpenBSD are Tier 2 supported platforms (:help
supported-platforms) but have had no CI coverage since Cirrus CI was
dropped in #39321. Restore build coverage for both using vmactions,
which boots the VM on a regular ubuntu-latest runner.
vim-patch:8.2.0110: prop_find() is not implemented
vim-patch:8.2.0318: Vim9: types not sufficiently tested
vim-patch:8.2.0518: a terminal falls back to setting $TERM to "xterm"
vim-patch:8.2.0543: Vim9: function with varargs does not work properly
vim-patch:8.2.0571: double free when passing invalid argument to job_start()
vim-patch:8.2.0582: color ramp test does not show text colors
vim-patch:8.2.1641: Vim9: cannot use 0 or 1 where a bool is expected
vim-patch:8.2.1692: build fails because TTFLAG_STATIC is missing
vim-patch:8.2.1855: Vim9: get error message when nothing is wrong
vim-patch:8.2.3104: Vim9: unspecified function type causes type error
vim-patch:8.2.3479: crash when calling job_start with an invalid argument
vim-patch:8.2.3481: failures when char is unsigned
vim-patch:9.0.1377: job_status() may return "dead" if the process parent changed
vim-patch:9.0.2084: Vim9: abstract static methods are possible
vim-patch:9.1.0751: Error callback for term_start() not used
vim-patch:9.1.1094: Vim9: problem finding implemented method in type hierarchy
vim-patch:9.2.0889: VMS: spurious "INVALID DECC FEATURE VALUE" message at every startup
vim-patch:6351c1775 CI: Bump github/codeql-action
vim-patch:64b0196a9 runtime(doc): remove todo entry for test_codestyle errors
vim-patch:8.2.0073: initializing globals with COMMA is clumsy
vim-patch:8.2.0253: crash when using :disassamble without argument
vim-patch:8.2.0306: Vim9: :substitute(pat(repl does not work in Vim9 script
vim-patch:8.2.0311: Vim9: insufficient script tests
vim-patch:8.2.0486: Vim9: some code and error messages not tested
vim-patch:8.2.0529: Vim9: function argument with default not checked
vim-patch:8.2.0530: test crashes on s390
vim-patch:8.2.0604: :startinsert in a terminal window used later
vim-patch:8.2.0652: compiler warning for char conversion
Problem:
Test fails if other "build*/" dirs exist with a "nvim" file, e.g.
`build-asan/bin/nvim`.
Solution:
Do the test in an isolated dir.
This also fixes the test for the zig build.
Problem: With 'virtualedit' set to "all" and 'cursorcolumn' set, the wrong
column may be highlighted after a command that moved the cursor
into virtual space and back (van-de-bugger).
Solution: Make sure the virtual column is up to date before drawing the
window (Hirohito Higashi).
fixes: vim/vim#2576closes: vim/vim#209025a90b9dbd2
Test only. This was already fixed by #39159.
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Problem: filetype: ed script files not recognised.
Solution: Add filetype detection for *.ed files and shebang lines,
include syntax script and syntax tests.
Features of the ed syntax file:
- BSD and GNU extensions are supported
- Andrew L. Moore's ed extensions are not supported
- Rebuild synmenu.vim
closes: vim/vim#19602c28515b999
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem:
`:set foo=<tab>` and `:set foo?` for func/expr options set to a Lua
function, always displays "v:lua".
The existing "<Lua N: file:line>" form was avoided because the ref id
N changes on every read of the same option.
Solution:
- Don't attempt to tab-complete Lua functions.
- Show "<Lua file:line>" (or "<Lua>" if source file is unknown).
Example:
:set operatorfunc?
operatorfunc=<Lua ~/.config/nvim/init.lua:42>
Target v8.2.0543
This can catch stray '#define' but they're most likely 'TTFLAG' for
Vim9 types. N/A.
TTFLAG is used in 'static_types[]'.
See v9.0.0623.
Adds optional parameters to `vim.fs.abspath`:
1. `cwd` to specify directory akin to `--relative-from` in `realpath(1)`.
2. `plain` disables expansion of tilde (~) in paths.