Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
14971:134ea82de781 | 14972:5d52b21b2e7f |
---|---|
296 if (diff_internal()) | 296 if (diff_internal()) |
297 { | 297 { |
298 // Will update diffs before redrawing. Set _invalid to update the | 298 // Will update diffs before redrawing. Set _invalid to update the |
299 // diffs themselves, set _update to also update folds properly just | 299 // diffs themselves, set _update to also update folds properly just |
300 // before redrawing. | 300 // before redrawing. |
301 // Do update marks here, it is needed for :%diffput. | |
301 tp->tp_diff_invalid = TRUE; | 302 tp->tp_diff_invalid = TRUE; |
302 tp->tp_diff_update = TRUE; | 303 tp->tp_diff_update = TRUE; |
303 return; | |
304 } | 304 } |
305 | 305 |
306 if (line2 == MAXLNUM) | 306 if (line2 == MAXLNUM) |
307 { | 307 { |
308 /* mark_adjust(99, MAXLNUM, 9, 0): insert lines */ | 308 /* mark_adjust(99, MAXLNUM, 9, 0): insert lines */ |
2848 theend: | 2848 theend: |
2849 diff_busy = FALSE; | 2849 diff_busy = FALSE; |
2850 if (diff_need_update) | 2850 if (diff_need_update) |
2851 ex_diffupdate(NULL); | 2851 ex_diffupdate(NULL); |
2852 | 2852 |
2853 // Check that the cursor is on a valid character and update it's | 2853 // Check that the cursor is on a valid character and update its |
2854 // position. When there were filler lines the topline has become | 2854 // position. When there were filler lines the topline has become |
2855 // invalid. | 2855 // invalid. |
2856 check_cursor(); | 2856 check_cursor(); |
2857 changed_line_abv_curs(); | 2857 changed_line_abv_curs(); |
2858 | 2858 |