diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-08-07 23:56:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-07 15:56:10 +0000 |
| commit | 52c251909572dc289006ef1741f99994c326bc0d (patch) | |
| tree | 18e14887d550f8657d998491102f63ab240fe7d7 /runtime/lua/vim/provider/python.lua | |
| parent | d994be44d77ac7527cf69995cb29d6fe0f158321 (diff) | |
| download | rneovim-52c251909572dc289006ef1741f99994c326bc0d.tar.gz rneovim-52c251909572dc289006ef1741f99994c326bc0d.tar.bz2 rneovim-52c251909572dc289006ef1741f99994c326bc0d.zip | |
vim-patch:9.1.1600: using diff anchors with hidden buffers fails silently (#35218)
Problem: diff: using diff anchors with hidden buffers fails silently
Solution: Give specific error message for diff anchors when using hidden
buffers (Yee Cheng Chin).
Diff anchors currently will fail to parse if a buffer used for diff'ing
is hidden. Previously it would just fail as the code assumes it would
not happen normally, but this is actually possible to do if `closeoff`
and `hideoff` are not set in diffopt. Git's default diff tool "vimdiff3"
also takes advantage of this.
This fix this properly would require the `{address}` parser to be
smarter about whether a particular address relies on window position or
not (e.g. the `'.` address requires an active window, but `'a` or `1234`
do not). Since hidden diff buffers seem relatively niche, just provide a
better error message / documentation for now. This could be improved
later if there's a demand for it.
related: vim/vim#17615
closes: vim/vim#17904
https://github.com/vim/vim/commit/cad3b2421de7b703e0ee619850a8a3bc55454281
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Diffstat (limited to 'runtime/lua/vim/provider/python.lua')
0 files changed, 0 insertions, 0 deletions