kiss-repository

personal kiss repository
git clone git://git.ckyln.com/~cem/kiss-repository.git
Log | Files | Refs | Submodules | README | LICENSE

nvi-07-flush_cache.patch (1180B)


      1 #! /bin/sh /usr/share/dpatch/dpatch-run
      2 ## 07flush_cache.dpatch by  <hesso@pool.math.tu-berlin.de>
      3 ##
      4 ## DP: No description.
      5 
      6 @DPATCH@
      7 diff -Naur nvi-1.81.6.orig/common/db1.c nvi-1.81.6/common/db1.c
      8 --- nvi-1.81.6.orig/common/db1.c	2007-11-18 17:41:42.000000000 +0100
      9 +++ nvi-1.81.6/common/db1.c	2008-05-01 18:07:58.000000000 +0200
     10 @@ -262,8 +262,7 @@
     11  	}
     12  
     13  	/* Flush the cache, update line count, before screen update. */
     14 -	if (lno <= ep->c_lno)
     15 -		ep->c_lno = OOBLNO;
     16 +	ep->c_lno = OOBLNO;
     17  	if (ep->c_nlines != OOBLNO)
     18  		--ep->c_nlines;
     19  
     20 @@ -314,8 +313,7 @@
     21  	}
     22  
     23  	/* Flush the cache, update line count, before screen update. */
     24 -	if (lno < ep->c_lno)
     25 -		ep->c_lno = OOBLNO;
     26 +	ep->c_lno = OOBLNO;
     27  	if (ep->c_nlines != OOBLNO)
     28  		++ep->c_nlines;
     29  
     30 @@ -386,8 +384,7 @@
     31  	}
     32  
     33  	/* Flush the cache, update line count, before screen update. */
     34 -	if (lno >= ep->c_lno)
     35 -		ep->c_lno = OOBLNO;
     36 +	ep->c_lno = OOBLNO;
     37  	if (ep->c_nlines != OOBLNO)
     38  		++ep->c_nlines;
     39  
     40 @@ -459,8 +456,7 @@
     41  	}
     42  
     43  	/* Flush the cache, before logging or screen update. */
     44 -	if (lno == ep->c_lno)
     45 -		ep->c_lno = OOBLNO;
     46 +	ep->c_lno = OOBLNO;
     47  
     48  	/* File now dirty. */
     49  	if (F_ISSET(ep, F_FIRSTMODIFY))