Files
neovim/runtime/doc
zeertzjq 52c2519095 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

cad3b2421d

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-08-07 15:56:10 +00:00
..
2025-08-03 05:03:09 +00:00
2023-07-25 05:07:13 -07:00
2025-07-10 21:50:46 -04:00
2025-05-03 10:08:53 -07:00
2024-05-15 23:19:26 +02:00
2025-04-27 15:44:11 -07:00
2023-06-25 17:14:28 +02:00
2025-07-10 21:50:46 -04:00
2025-08-03 07:45:49 -07:00
2025-06-14 17:24:36 +02:00
2025-05-03 10:08:53 -07:00
2022-10-14 08:01:13 -07:00
2025-03-30 13:29:36 -07:00
2025-08-03 07:45:49 -07:00
2025-06-01 14:13:50 -07:00
2024-01-18 00:14:48 -08:00
2023-01-01 15:05:13 +01:00
2025-03-15 15:00:44 +01:00
2025-05-03 15:47:59 -07:00
2023-08-10 17:28:02 +08:00
2025-08-03 05:03:09 +00:00
2025-01-03 08:29:36 -08:00
2024-04-23 08:20:36 +08:00
2024-05-11 18:14:03 +08:00
2023-04-23 15:22:55 +02:00
2023-01-03 10:07:43 +00:00
2023-06-25 17:14:28 +02:00
2023-06-25 17:14:28 +02:00
2018-10-29 10:01:44 +01:00
2023-06-25 17:14:28 +02:00
2021-04-29 20:42:16 -04:00
2023-06-26 11:29:12 +02:00
2023-07-25 05:07:13 -07:00
2025-06-18 12:12:23 +02:00
2023-06-19 08:40:33 -07:00