diff options
author | Jaehwang Jung <tomtomjhj@gmail.com> | 2023-03-11 16:52:46 +0900 |
---|---|---|
committer | Jaehwang Jung <tomtomjhj@gmail.com> | 2023-03-11 18:22:00 +0900 |
commit | 2748202e0eb28574cdc65dcb758adea89023271d (patch) | |
tree | 3e9a5a834bf280b3ecc1d29c56557c6f3f4a17d4 /src/nvim/diff.c | |
parent | 236c20795eb9f11e21e0719b735ea741711acc08 (diff) | |
download | rneovim-2748202e0eb28574cdc65dcb758adea89023271d.tar.gz rneovim-2748202e0eb28574cdc65dcb758adea89023271d.tar.bz2 rneovim-2748202e0eb28574cdc65dcb758adea89023271d.zip |
fix(diff): trigger on_bytes only once after diffget/diffput
Problem: The fix from b50ee4a8dc4306e4be78ac33fb74b21dc6be5538 may
adjust extmark twice, triggering on_bytes callback twice.
Solution: Don't let mark_adjust adjust extmark.
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 289939b2ca..52c5732f23 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -3136,7 +3136,7 @@ static void diffgetput(const int addr_count, const int idx_cur, const int idx_fr if (added != 0) { // Adjust marks. This will change the following entries! - mark_adjust(lnum, lnum + count - 1, (long)MAXLNUM, added, kExtmarkUndo); + mark_adjust(lnum, lnum + count - 1, (long)MAXLNUM, added, kExtmarkNOOP); if (curwin->w_cursor.lnum >= lnum) { // Adjust the cursor position if it's in/after the changed // lines. |