diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-06-22 08:00:17 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-22 08:00:17 +0800 |
| commit | ee2fc31b3664070600a8c5462c1dc46d124c8bc3 (patch) | |
| tree | cc36efb3e1adfac808414ddeddd01b8e4c217c69 /runtime/lua/vim/_system.lua | |
| parent | 0980617c0df7095ad3dfcbd0ef0b3a250c87139f (diff) | |
| download | rneovim-ee2fc31b3664070600a8c5462c1dc46d124c8bc3.tar.gz rneovim-ee2fc31b3664070600a8c5462c1dc46d124c8bc3.tar.bz2 rneovim-ee2fc31b3664070600a8c5462c1dc46d124c8bc3.zip | |
vim-patch:9.1.1473: inconsistent range arg for :diffget/diffput (#34588)
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: vim/vim#17579
https://github.com/vim/vim/commit/d75ab0cbf5cfaefab3edb0aa553954de70b236f8
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Diffstat (limited to 'runtime/lua/vim/_system.lua')
0 files changed, 0 insertions, 0 deletions