Fix vim/vim#14437 and some other problems in diff mode.#15735
Closed
ynkdir wants to merge 3 commits intovim:masterfrom
Closed
Fix vim/vim#14437 and some other problems in diff mode.#15735ynkdir wants to merge 3 commits intovim:masterfrom
ynkdir wants to merge 3 commits intovim:masterfrom
Conversation
Vim merges overlapped diff blocks and it doesn't work expectedly in some situation.
Member
|
Thanks. Can you give an example what vimdiff currently does and how it should look like? |
Contributor
Author
Member
|
okay thanks. That is clearly wrong |
Contributor
Author
|
Thank you. |
zeertzjq
added a commit
to zeertzjq/neovim
that referenced
this pull request
Sep 27, 2024
…ctly
Problem: diff mode does not handle overlapping diffs correctly
Solution: correct the logic to handle overlapping blocks
(Yukihiro Nakadaira)
Vim merges overlapped diff blocks and it doesn't work expectedly
in some situation.
closes: vim/vim#15735
vim/vim@06fe70c
Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
zeertzjq
added a commit
to neovim/neovim
that referenced
this pull request
Sep 27, 2024
…ctly (#30532) Problem: diff mode does not handle overlapping diffs correctly Solution: correct the logic to handle overlapping blocks (Yukihiro Nakadaira) Vim merges overlapped diff blocks and it doesn't work expectedly in some situation. closes: vim/vim#15735 vim/vim@06fe70c Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
Naofal-Helal
pushed a commit
to Naofal-Helal/neovim
that referenced
this pull request
Sep 29, 2024
…ctly (neovim#30532) Problem: diff mode does not handle overlapping diffs correctly Solution: correct the logic to handle overlapping blocks (Yukihiro Nakadaira) Vim merges overlapped diff blocks and it doesn't work expectedly in some situation. closes: vim/vim#15735 vim/vim@06fe70c Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


In diff mode Vim merges overlapped diff blocks. But it doesn't work expectedly in some situation.
Here is diagram of added test.
https://viewer.diagrams.net/?tags=%7B%7D&lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=vim_diff_read.drawio#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D1t9z_dy3Q3zZBHx5wG_mtEekAnI89ANfn%26export%3Ddownload