Problem: No test that undofile format does not regress
Solution: include a sample undofile to make sure we are always able to
read it
This is so, that we don't unintentionally change the undofile format and
make sure we can load an undo file that has been created by an older
Vim.
closes: vim/vim#1612714382c8bc9
Convert the undo file in samples/ using method from #13973.
Co-authored-by: Christian Brabandt <cb@256bit.org>
This reverts commits:
- 6b652a785033fd4164e049492a7327c1ed7c3e5f
- 2f689d5abde0ccddca9e20d8c93a0299bd054e32
- a025a46d4169587145fb54f04af349cd05cb6122
Several email addresses that are known to be valid caused bounces
due to an issue with my email setup. The previous commits incorrectly
marked these addresses as invalid. So revert the whole thing again.
62d8f3dab5
N/A patch:
vim-patch:2f689d5: runtime: mark more invalid email addresses
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Cursor displayed in wrong position after deleting line.
Solution: When deleting lines do not approximate botline. (fixesvim/vim#8559)
5bea41dea3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem:
When the `#offset!` directive is used with `:EditQuery`, the query does not take the offset into consideration when creating the extmark to preview the capture.
Solution:
Use the capture metadata to modify the node range before creating the extmark.
vim-patch:9.1.2018: proto: ops.pro outdated
vim-patch:08aaa7ae1 runtime(doc): remove some fixed items from todo.txt
vim-patch:ea2b98b9e runtime(indent-tests): Include a simple Rust indent test
vim-patch:9.1.2031: Makefile: cannot run make installinks twice
vim-patch:8.2.0827: Vim9: crash in :defcompile
vim-patch:8.2.1643: Vim9: :defcompile compiles dead functions
vim-patch:8.2.1750: popup_setoptions() setting firstline fails if cursorline set
vim-patch:8.2.4947: text properties not adjusted when accepting spell suggestion
vim-patch:8.2.4989: cannot specify a function name for :defcompile
vim-patch:8.2.4990: memory leak when :defcompile fails
vim-patch:9.0.0147: cursor positioned wrong after two "below" text properties
vim-patch:9.0.0168: cursor positioned wrong with two virtual text properties
vim-patch:9.0.0233: removing multiple text properties takes many calls
vim-patch:9.0.0243: text properties "below" sort differently on MS-Windows
vim-patch:9.0.0464: with virtual text "above" indenting doesn't work well
vim-patch:9.0.0466: virtual text wrong after adding line break after line
vim-patch:9.1.0020: Vim9: cannot compile all methods in a class
vim-patch:9.1.0189: Memory leak with "above" virttext and 'relativenumber'
vim-patch:9.1.1654: build failure when FEAT_DIFF is not defined
vim-patch:9.1.1925: make depend does not include osdef.h
Problem: vim.fs.root uses vim.fn.fnamemodify. vim.fn table isn't
available from nvim -ll or thread contexts.
Solution: Swap out vim.fn.fnamemodify for vim.fs.abspath.
This is a temporary workaround and may be reverted since the
long-term plan is to use more fast=true "fn" functions from vim.fs
where possible.
Problem:
We want to encourage implementing core features in Lua instead of C, but
it's clumsy because:
- Core Lua code (built into `nvim` so it is available even if VIMRUNTIME
is missing/invalid) requires manually updating CMakeLists.txt, or
stuffing it into `_editor.lua`.
- Core Lua modules are not organized similar to C modules, `_editor.lua`
is getting too big.
Solution:
- Introduce `_core/` where core Lua code can live. All Lua modules added
there will automatically be included as bytecode in the `nvim` binary.
- Move these core modules into `_core/*`:
```
_defaults.lua
_editor.lua
_options.lua
_system.lua
shared.lua
```
TODO:
- Move `_extui/ => _core/ui2/`
Problem:
Terminals should respond with the terminator (either BEL or ST) used in
the query so that clients can reliably parse the responses. The
`TermRequest` autocmd used to handle background color requests in the
terminal does not have access to the original sequence terminator, so it
always uses BEL. #37018
Solution:
Update vterm parsing to include the terminator type, then forward this
data into the emitted `TermRequest` events for OSC/DCS/APC sequences.
Update the foreground/background `TermRequest` callback to use the same
terminator as the original request.
Details:
I didn't add the terminator to the `TermResponse` event. However, I
assume the `TermResponse` event doesn't care about the terminator
because the sequence is already parsed. I also didn't update any of the
functions in `src/nvim/vterm/state.c` that write out responses. It
looked like those all pretty much used ST, and it would be a much larger
set of changes. In that same file, there's also logic for 8 bit ST
sequences, but from what I can tell, 8 bit doesn't really work (see `:h
xterm-8bit`), so I didn't use the 8 bit ST at all.
Problem: inefficient use of ga_concat()
Solution: Use ga_concat_len() when length is known.
(John Marriott)
closes: vim/vim#1902732b801abc3
Co-authored-by: John Marriott <basilisk@internode.on.net>
Problem: Deleting active plugins can lead to a situation when it is
reinstalled after restart.
Solution: Suggest "delete" code action only for not active plugins.
Whether a plugin is not active is visible by a hint in its header.
Problem: After `vim.pack.update()` it is not clear if plugin is active
or not. This can be useful to detect cases when plugin was removed
from 'init.lua' but there was no `vim.pack.del()`.
Solution: Add ` (not active)` suffix with distinctive highlighting to
header of plugins that are not active.
It will also be shown in in-process LSP document symbols to have quick
reference about which plugins are not active.
Problem: Using `vim.pack.del()` to delete active plugin can lead to
a situation when this plugin is reinstalled after restart. Removing
plugin from 'init.lua' is documented, but can be missed.
Solution: Make `del()` only remove non-active plugins by default and
throw an informative error if there is an active plugin.
Add a way to force delete any plugin by adding `opts.force`. This also
makes `del()` signature be the same as other functions, which is nice.
Problem: Exe stack length can be wrong without being detected.
Solution: Add a check when ABORT_ON_INTERNAL_ERROR is defined.
e31ee86859
vim-patch:8.2.3262: build failure when ABORT_ON_INTERNAL_ERROR is defined
Port patch 9.0.1454 for "make formatc".
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Buffer overflow in buf_write() when converting incomplete
multi-byte characters (Kevin Goodsell)
Solution: Make the buffer slightly larger
closes: vim/vim#19007f99de42a9f
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: No indention support when editing bpftrace files.
Solution: Add indention settings based on cindent with custom options.
closes: vim/vim#19030ee3f10af87
Co-authored-by: Stanislaw Gruszka <stf_xl@wp.pl>
Problem: filetype: bicep filetype used for 2 bicep file types
Solution: Detect *.bicepparam files as bicep-param filetype, include
new bicep-params and bicep filetype plugin
(Scott McKendry)
The bicep language server handles parameter files differently than
regular bicep files. Treating them the same at the editor level leads to
false positive diagnostics in the editor.
References:
Bicep Language Constants:
- 51392d32ca/src/Bicep.Core/LanguageConstants.cs (L23)
VS Code Extension definition:
- 51392d32ca/src/vscode-bicep/package.json (L47)closes: vim/vim#190264e722fdfdd
Co-authored-by: Scott McKendry <me@scottmckendry.tech>
Problem: 'fsync' option cannot be set per buffer
Solution: Make 'fsync' option global-local
(glepnir)
closes: vim/vim#190194d5b303726
Co-authored-by: glepnir <glephunter@gmail.com>
Problem: When virtualedit is set to all, the cursor is supposed to be
permitted to reside anywhere, including on the virtual space
beyond the end of the buffer's text. Switching modes triggered
a routine that "fixed" a cursor that was past the end of the
line by shifting it back to the last actual character in the
line and compensating with a virtual column offset. While
visually identical, this re-encoding changed the underlying
byte index, causing position-reporting functions to return
inconsistent values after a mode change.
Solution: Skip this coordinate adjustment when virtual editing is fully
enabled. By treating the line terminator as a valid, stable
position, the cursor’s internal representation remains
unchanged when entering or exiting Visual mode, ensuring
consistent coordinate reporting. Add a regression test to
check this functionality.
(McAuley Penney)
fixes: vim/vim#16276closes: vim/vim#19009491f0fa457
Co-authored-by: McAuley Penney <jacobmpenney@gmail.com>
fix(pum): hide info window when insufficient space
Problem:
1. Info window was displayed even with insufficient space.
2. Tab characters counted as single cells.
Solution:
1. Hide window when space < 10 columns. Will be configurable
via completepopup width option in the future.
2. Use win_linetabsize over mb_string2cells.
Problem: When Vim is launched with a UNC directory, netrw treats it as a
relative path and compose it again.
Solution: This is due to `exists("g:netrw_cygwin")` always being true.
We can directly use `g:netrw_cygwin`.
closes: vim/vim#19015538da34ad3
Co-authored-by: tao <2471314@gmail.com>
Problem: tests: test_virtualedit.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!
a8a0ee5004
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: There is now way to run `update()` without Internet connection
while there are some workflows that do not require it. Like "switch
plugin version" and "revert latest update".
Solution: Add `opts.offline` to `update()`. This also allows now to
treat `vim.pack.update(nil, { offline = true })` as a way to
interactively explore currently installed plugins.
Problem: There are two fairly common workflows that involve lockfile and
can be made more straightforward in `vim.pack`:
1. Revert latest update. Like if it introduced unwanted behavior.
2. Update to a revision in the lockfile. Like if already updated
on another machine, verified that everything works, `git add` +
`git commit` + `git push` the config, and want to have the same
plugin states on current machine.
Solution: Make `update` allow `opts.target`. By default it uses
`version` from a plugin specification (like a regular "get new changes
from source" workflow). But it also allows `"lockfile"` value to
indicate that target revision after update should be taken from the
current lockfile verbatim.
With this, the workflows are:
1. Revert (somehow) to the lockfile before the update, restart, and
`vim.pack.update({ 'plugin' }, { target = 'lockfile' })`. If Git
tracked, revert with `git checkout HEAD -- nvim-pack-lock.json`.
For non-VCS tracked lockfile, the revisions can be taken from the
log file. It would be nicer if `update()` would backup a lockfile
before doing an update, but that might require discussions.
2. `git pull` + `:restart` +
`vim.pack.update(nil, { target = 'lockfile' })`.
The only caveats are for new and deleted plugins:
- New plugins (not present locally but present in the lockfile)
will be installed at lockfile revision during restart.
- Deleted plugins (present locally but not present in the
lockfile) will still be present: both locally *and* in the
lockfile. They can be located by
`git diff -- nvim-pack-lock.json` and require manual
`vim.pack.del({ 'old-plugin1', 'old-plugin2' })`.
Problem: Substitute that joins lines drops text properties.
Solution: Move text properties of the last line to the new line.
213bbaf15a
Co-authored-by: Bram Moolenaar <Bram@vim.org>