File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121
2222#if defined(FEAT_DIFF ) || defined(PROTO )
2323
24- static int diff_busy = FALSE; /* ex_diffgetput() is busy */
24+ static int diff_busy = FALSE; // using diff structs, don't change them
25+ static int diff_need_update = FALSE; // ex_diffupdate needs to be called
2526
2627/* flags obtained from the 'diffopt' option */
2728#define DIFF_FILLER 0x001 // display filler lines
@@ -908,6 +909,12 @@ ex_diffupdate(exarg_T *eap) // "eap" can be NULL
908909 int idx_new ;
909910 diffio_T diffio ;
910911
912+ if (diff_busy )
913+ {
914+ diff_need_update = TRUE;
915+ return ;
916+ }
917+
911918 // Delete all diffblocks.
912919 diff_clear (curtab );
913920 curtab -> tp_diff_invalid = FALSE;
@@ -2660,7 +2667,7 @@ ex_diffgetput(exarg_T *eap)
26602667 if (diff_buf_idx (curbuf ) != idx_to )
26612668 {
26622669 EMSG (_ ("E787: Buffer changed unexpectedly" ));
2663- return ;
2670+ goto theend ;
26642671 }
26652672 }
26662673
@@ -2831,7 +2838,13 @@ ex_diffgetput(exarg_T *eap)
28312838 aucmd_restbuf (& aco );
28322839 }
28332840
2841+ theend :
28342842 diff_busy = FALSE;
2843+ if (diff_need_update )
2844+ {
2845+ diff_need_update = FALSE;
2846+ ex_diffupdate (NULL );
2847+ }
28352848
28362849 /* Check that the cursor is on a valid character and update it's position.
28372850 * When there were filler lines the topline has become invalid. */
Original file line number Diff line number Diff line change @@ -794,6 +794,8 @@ static char *(features[]) =
794794
795795static int included_patches [] =
796796{ /* Add new patch number below this line */
797+ /**/
798+ 400 ,
797799/**/
798800 399 ,
799801/**/
You can’t perform that action at this time.
0 commit comments