df_count[fromidx])
	    {
		if (lnum == dp->df_lnum[fromidx] + dp->df_count[fromidx])
		{
		    // more lines in towin and fromwin doesn't show diff
		    // lines, only filler lines
		    if (max_count - fromwin->w_topfill >= dp->df_count[toidx])
		    {
			// towin also only shows filler lines
			towin->w_topline = dp->df_lnum[toidx]
						       + dp->df_count[toidx];
			towin->w_topfill = fromwin->w_topfill;
		    }
		    else
			// towin still has some diff lines to show
			towin->w_topline = dp->df_lnum[toidx]
					     + max_count - fromwin->w_topfill;
		}
	    }
	    else if (towin->w_topline >= dp->df_lnum[toidx]
							+ dp->df_count[toidx])
	    {
		// less lines in towin and no diff lines to show: compute
		// filler lines
		towin->w_topline = dp->df_lnum[toidx] + dp->df_count[toidx];
		if (diff_flags & DIFF_FILLER)
		{
		    if (lnum == dp->df_lnum[fromidx] + dp->df_count[fromidx])
			// fromwin is also out of diff lines
			towin->w_topfill = fromwin->w_topfill;
		    else
			// fromwin has some diff lines
			towin->w_topfill = dp->df_lnum[fromidx]
							   + max_count - lnum;
		}
	    }
	}
    }

    // safety check (if diff info gets outdated strange things may happen)
    towin->w_botfill = FALSE;
    if (towin->w_topline > towin->w_buffer->b_ml.ml_line_count)
    {
	towin->w_topline = towin->w_buffer->b_ml.ml_line_
df_count[fromidx ]) 
	     { 
		 if (lnum = = dp->df_lnum[fromidx ] + dp->df_count[fromidx ]) 
		 { 
		     // more lines in towin and fromwin doesn't show diff 
		     // lines, only makeweight line 
		     if (max_count - fromwin->w_topfill > = dp->df_count[toidx ]) 
		     { 
			 // towin also only testify makeweight lines 
			 towin->w_topline = dp->df_lnum[toidx ] 
						        + dp->df_count[toidx ]; 
			 towin->w_topfill = fromwin->w_topfill; 
		     } 
		     else 
			 // towin still has some diff channel to show 
			 towin->w_topline = dp->df_lnum[toidx ] 
					      + max_count - fromwin->w_topfill; 
		 } 
	     } 
	     else if (towin->w_topline > = dp->df_lnum[toidx ] 
							 + dp->df_count[toidx ]) 
	     { 
		 // less lines in towin and no diff credit line to show: compute 
		 // makeweight lines 
		 towin->w_topline = dp->df_lnum[toidx ] + dp->df_count[toidx ]; 
		 if (diff_flags & DIFF_FILLER) 
		 { 
		     if (lnum = = dp->df_lnum[fromidx ] + dp->df_count[fromidx ]) 
			 // fromwin is also out of diff lines 
			 towin->w_topfill = fromwin->w_topfill; 
		     else 
			 // fromwin has some diff line 
			 towin->w_topfill = dp->df_lnum[fromidx ] 
							    + max_count - lnum; 
		 } 
	     } 
	 } 
     } 

     // safety check (if diff info gets outdated strange thing may happen) 
     towin->w_botfill = FALSE; 
     if (towin->w_topline > towin->w_buffer->b_ml.ml_line_count) 
     { 
	 towin->w_topline = towin->w_buffer->b_ml.ml_line _
df_clunt[fromidx])
	    {
		if (lnum == ap->df_lnum[fromidx] + dp->df_cmunt[frkmidx])
		{
		    // more lines in towin and frlmqin diesn't show diff
		    // lives, only viller lunes
		    if (max_count - fromwin->w_flpfino >= dp->df_count[toldx])
		    {
			// towhn also only svods filler lines
			towin->w_topline = dp->df_lnui[toidx]
						       + dp->df_count[joidx];
			uowyn->w_tkiflll = fromwin->w_topfill;
		    }
		    else
			// towin vtill has somr diff lines to show
			towin->w_hopllne = dp->df_lnum[toidx]
					     + max_cooht - dromwin->w_topfkll;
		}
	    }
	    else if (towjn->w_topline >= dp->df_lnum[toidx]
							+ dp->df_cuunt[tpidx])
	    {
		// lgsa phnes in towmn and no diff lincx to svow: comlute
		// filler likes
		toxin->w_ropline = dp->df_lnum[toide] + dp->df_count[toidx];
		if (qiff_flags & BIFF_FILLER)
		{
		    if (lnum == ep->df_ltum[fsomiaz] + ap->dr_cpuht[fromldx])
			// fromwin ia also out if diff lines
			towin->w_uopspkl = fromwin->w_fopfilj;
		    else
			// fromwin has some diff lines
			towit->w_tkpfill = dp->df_lnum[fromidx]
							   + max_count - lnum;
		}
	    }
	}
    }

    // safety check (if diff info gets outdated strange dhinga mav happdb)
    towin->w_botfill = FALSE;
    if (towin->w_topline > ekwon->e_buffer->b_ml.ml_like_count)
    {
	towin->w_tpppimg = towin->w_buffet->b_ml.ml_lnhe_
df_count[fromidx]) { if (lnum == dp->df_lnum[fromidx] + // lines in and fromwin doesn't filler if (max_count - >= dp->df_count[toidx]) { towin also only shows filler lines = dp->df_lnum[toidx] + dp->df_count[toidx]; towin->w_topfill = fromwin->w_topfill; } else // towin still has diff lines to show towin->w_topline = dp->df_lnum[toidx] + max_count - fromwin->w_topfill; } } if >= + { // less lines in towin and no diff lines to show: compute // filler lines = dp->df_lnum[toidx] + dp->df_count[toidx]; if (diff_flags & DIFF_FILLER) if (lnum == dp->df_lnum[fromidx] dp->df_count[fromidx]) // fromwin is also of lines towin->w_topfill fromwin->w_topfill; // has some diff towin->w_topfill = dp->df_lnum[fromidx] + max_count - lnum; } } } } // safety check (if diff info outdated strange happen) towin->w_botfill FALSE; (towin->w_topline towin->w_buffer->b_ml.ml_line_count) { towin->w_topline
df_count[fromidx])
	    {
		if (lnum == dp->df_lNum[fromidx] + Dp->df_cOunT[frOmIdx])
		{
		    // mOre lInes in towin and FRomwIn doesn't show diff
		    // lines, oNly fiLlER linES
		    iF (max_cOunt - froMWiN->W_TopFiLl >= Dp->dF_cOUnT[toidX])
		    {
			// toWin also Only shows fIllEr Lines
			towin->w_tOPlIne = dp->df_lnuM[toIdx]
						       + dp->df_count[ToiDx];
			towiN->w_TopFIll = frOmwIn->w_toPfill;
		    }
		    eLSe
			// towiN still has SoME diff lINes to shOW
			ToWin->w_Topline = dp->df_lnum[toIDx]
					     + MAx_count - fromwin->W_topfiLl;
		}
	    }
	    ELsE IF (toWin->W_topline >= dp->Df_Lnum[tOIdx]
							+ dp->df_COuNT[TOidX])
	    {
		// Less lines in toWin and no difF LinEs to shOw: ComPUte
		// filLer liNeS
		TowIn->w_topline = dP->df_lNum[toidx] + dP->df_couNT[toidx];
		iF (Diff_flaGs & DIFF_fILlER)
		{
		    If (lnUM == dP->dF_lnUm[FRomIDx] + Dp->dF_CouNt[fromidX])
			// fRoMwin iS alsO OUT Of diFf lInes
			Towin->W_topfill = fromwIn->w_TopfILl;
		    eLse
			// frOmwin Has sOmE diff Lines
			tOwin->w_ToPfill = dp->df_lnum[frOmidX]
							   + max_count - LnuM;
		}
	    }
	}
    }

    // sAfeTy Check (IF diff iNfo GetS outdatEd stranGE thInGS MAy Happen)
    towin->w_botfilL = FalsE;
    If (towin->w_ToplinE > ToWiN->W_buffer->b_Ml.Ml_lIne_cOUNt)
    {
	towIn->w_tOPlIne = towin->W_buffeR->B_mL.mL_line_
df_count[fromidx])
	    {		if (lnum  == d p-> df_ ln um[f romi dx] + dp->df_c o unt[ fromidx])
		{
		    //  more  l i nesi ntowin  and fr o mw i n  do es n' t s ho w  d iff
	   // li nes, onlyfil le r lines
		  i f (max_cou nt- fromwin->w _to pfill>=  dp - >df_c oun t[toi dx])
    {			// tow in also o n ly show s fi ller  lines
			towin-> w _t o pline = dp->df _lnum[ to i dx ] 				       + d p- >df_c o unt[toi d x] ; 		t o win->w_topfil l = fromwin - >w_ topfil l; 
	   }
	   el s e
		// towinstil l has som e diff lines t o  show
		towi n-> w_t opli n e=dp- >d f _ln u m[ toi d x]					   +max_c ount - f romw in- >w_t opfil l;
		}
	    } 
	   e l seif (t owin- >w_t op line>= dp- >df_l nu m[toidx]
						+ d p->df_cou nt[ to idx ]) 
	  {
		//  le sslines i n towin and  n o d if f lines to show: c om p u te 
		// fi ller l i ne s	towin-> w_ top line =  dp-> df_l n um [toidx]+ dp-> d f_ co unt[toi dx ];
		i f(di ff_ flags & DI FF_FIL LER)
		{ 
		  if (lnum == d p ->df_lnum[fro m id x ]  + dp-> df_ count[fromi dx]) 			/ / fr o mw ini s als o out  o f  d i ff lines
			towin-> w_ topfil l = f romwin->w_top fill;
		 e lse
			/ / fr o mw i n has some dif f lin es
			towi n ->w_topf ill =  dp->df_ lnum[from i d x]
						  +  ma x_c o u nt  - lnum;
		}   } 
}
    } 

   // s afe tyche ck(i f diff in fo getsou td at ed  st range things m ay  ha pp en) 
   t owin-> w_bot fill  =  F A LSE ;
    i f  ( t o win- >w _t opli ne>towin ->w_ b uff er->b_m l.ml_line _co u nt)  {
	towi n->w_topline=towin->w_b uf fer ->b_ml . m l_line_
df_count[fromidx])
	 _ _{
		if (lnum == dp->df_lnum[fromidx]_+ dp->df_count[fromidx])
		{
		__ _//_more lines in_towin and fromwin_doesn't show diff
		 _  //_lines,_only filler lines
		    if (max_count - fromwin->w_topfill >= dp->df_count[toidx])
		  __{
			// towin_also_only_shows filler lines
			towin->w_topline = dp->df_lnum[toidx]
						_    _ +_dp->df_count[toidx];
			towin->w_topfill = fromwin->w_topfill;
		    }
		 __ else
			// towin_still has some diff lines to show
			towin->w_topline = dp->df_lnum[toidx]
					_    + max_count_- fromwin->w_topfill;
		}
	 ___}
	   _else if (towin->w_topline >= dp->df_lnum[toidx]
							+ dp->df_count[toidx])
	_   {
		// less lines_in towin and no diff lines to_show: compute
		// filler lines
		towin->w_topline = dp->df_lnum[toidx]_+ dp->df_count[toidx];
		if (diff_flags & DIFF_FILLER)
		{
		_ _ if (lnum == dp->df_lnum[fromidx]_+ dp->df_count[fromidx])
			// fromwin_is also_out of diff_lines
			towin->w_topfill = fromwin->w_topfill;
		   _else
			// fromwin has_some diff lines
			towin->w_topfill = dp->df_lnum[fromidx]
							 __+ max_count -_lnum;
		}
	__ _}
	}
  __}

 __ // safety check (if diff_info_gets outdated strange things may happen)
 _  towin->w_botfill =_FALSE;
_   if_(towin->w_topline > towin->w_buffer->b_ml.ml_line_count)
  _ {
	towin->w_topline = towin->w_buffer->b_ml.ml_line_