Mercurial > vim
diff src/diff.c @ 14972:5d52b21b2e7f v8.1.0497
patch 8.1.0497: :%diffput changes order of lines
commit https://github.com/vim/vim/commit/5f57bdcab77bc417ae0357fe8ad6c7259b6d25df
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Oct 25 17:52:23 2018 +0200
patch 8.1.0497: :%diffput changes order of lines
Problem: :%diffput changes order of lines. (Markus Braun)
Solution: Do adjust marks when using internal diff.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 25 Oct 2018 18:00:07 +0200 |
parents | 291656f731c9 |
children | d56f14540dda |
line wrap: on
line diff
--- a/src/diff.c +++ b/src/diff.c @@ -298,9 +298,9 @@ diff_mark_adjust_tp( // Will update diffs before redrawing. Set _invalid to update the // diffs themselves, set _update to also update folds properly just // before redrawing. + // Do update marks here, it is needed for :%diffput. tp->tp_diff_invalid = TRUE; tp->tp_diff_update = TRUE; - return; } if (line2 == MAXLNUM) @@ -2850,7 +2850,7 @@ theend: if (diff_need_update) ex_diffupdate(NULL); - // Check that the cursor is on a valid character and update it's + // Check that the cursor is on a valid character and update its // position. When there were filler lines the topline has become // invalid. check_cursor();