Skip to content

Fix vim/vim#14437 and some other problems in diff mode.#15735

Closed
ynkdir wants to merge 3 commits intovim:masterfrom
ynkdir:fix-diff-overlapped
Closed

Fix vim/vim#14437 and some other problems in diff mode.#15735
ynkdir wants to merge 3 commits intovim:masterfrom
ynkdir:fix-diff-overlapped

Conversation

@ynkdir
Copy link
Contributor

@ynkdir ynkdir commented Sep 24, 2024

Vim merges overlapped diff blocks and it doesn't work expectedly
in some situation.
@chrisbra
Copy link
Member

Thanks. Can you give an example what vimdiff currently does and how it should look like?

@ynkdir
Copy link
Contributor Author

ynkdir commented Sep 24, 2024

For example.

$ cat a.txt
a
b
c
$ cat b.txt
a
x
c
$ cat c.txt
y
b
c
$ vim --clean -d a.txt b.txt c.txt

result

result

expected

expected

@chrisbra
Copy link
Member

okay thanks. That is clearly wrong

@chrisbra chrisbra closed this in 06fe70c Sep 26, 2024
@ynkdir
Copy link
Contributor Author

ynkdir commented Sep 26, 2024

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>
@ynkdir ynkdir deleted the fix-diff-overlapped branch January 16, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants