comparison src/diff.c @ 14893:291656f731c9 v8.1.0458

patch 8.1.0458: ml_get error and crash when using "do" commit https://github.com/vim/vim/commit/df77cef92ec034796723ffa3adb12e8b46daa98e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 7 17:46:42 2018 +0200 patch 8.1.0458: ml_get error and crash when using "do" Problem: Ml_get error and crash when using "do". Solution: Adjust cursor position also when diffupdate is not needed. (Hirohito Higashi)
author Bram Moolenaar <Bram@vim.org>
date Sun, 07 Oct 2018 18:00:05 +0200
parents 552523e44923
children 5d52b21b2e7f
comparison
equal deleted inserted replaced
14892:983b36c27a2b 14893:291656f731c9
2846 } 2846 }
2847 2847
2848 theend: 2848 theend:
2849 diff_busy = FALSE; 2849 diff_busy = FALSE;
2850 if (diff_need_update) 2850 if (diff_need_update)
2851 { 2851 ex_diffupdate(NULL);
2852
2853 // Check that the cursor is on a valid character and update it's
2854 // position. When there were filler lines the topline has become
2855 // invalid.
2856 check_cursor();
2857 changed_line_abv_curs();
2858
2859 if (diff_need_update)
2860 // redraw already done by ex_diffupdate()
2852 diff_need_update = FALSE; 2861 diff_need_update = FALSE;
2853 ex_diffupdate(NULL);
2854 }
2855 else 2862 else
2856 { 2863 {
2857 // Check that the cursor is on a valid character and update it's
2858 // position. When there were filler lines the topline has become
2859 // invalid.
2860 check_cursor();
2861 changed_line_abv_curs();
2862
2863 // Also need to redraw the other buffers. 2864 // Also need to redraw the other buffers.
2864 diff_redraw(FALSE); 2865 diff_redraw(FALSE);
2865 apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf); 2866 apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
2866 } 2867 }
2867 } 2868 }