Files
vim/runtime/doc
Yee Cheng Chin d75ab0cbf5 patch 9.1.1473: inconsistent range arg for :diffget/diffput
Problem:  inconsistent range arg for :diffget/diffput
Solution: fix the range specification, place the cursor for :diffput and
          :diffget consistently on the last line (Yee Cheng Chin)

Previously, `:<range>diffget` only allowed using 1 or above in the range
value, making it impossible to use the command for a diff block at the
beginning of the file. Fix the range specification so the user can now
use 0 to specify the space before the first line. This allows
`:0,$+1diffget` to work to retrieve all the changes from the other file
instead of missing the first diff block. Also do this for `:diffput`.

Also, make `:diffput` work more similar to `:diffget`. Make it so that
if the cursor is on the last line and a new line is inserted in the
other file, doing `:diffput` will select that diff block below the line,
just like `:diffget` would.

Also clean up the logic a little bit for edge cases and for handling
line matched diff blocks better.

closes: #17579

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-20 18:44:18 +02:00
..
2024-01-02 16:51:11 +01:00
2024-07-17 20:04:22 +02:00
2024-01-02 16:51:11 +01:00
2024-08-20 19:57:00 +02:00
2024-01-02 16:51:11 +01:00
2024-12-17 20:48:42 +01:00
2024-09-29 10:10:51 +02:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2021-06-27 15:18:56 +02:00
2022-02-26 12:25:45 +00:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2020-05-26 21:20:45 +02:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2020-01-14 19:29:13 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2025-06-07 17:35:18 +02:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-12-17 20:24:24 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2025-03-03 08:16:27 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2024-08-20 19:57:00 +02:00
2022-01-16 14:46:06 +00:00
2024-08-20 19:57:00 +02:00
2024-01-02 16:51:11 +01:00
2024-01-02 16:51:11 +01:00
2024-09-17 19:12:03 +02:00
2024-09-17 19:03:16 +02:00