commit c5e519b528e9beb89c6f4588989201f522f408fd
parent ecd471e28ba6485ecbd0bfb35c09abd2016b59ec
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date: Thu, 16 Jun 2011 01:28:18 +0200
Some unneeded screen updates removed.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sandy.c b/sandy.c
@@ -1303,13 +1303,13 @@ i_update(void) {
if(l==fsel.l) /* Selection starts before screen view */
selection=!selection;
}
- for(irow=0, l=scrline; l; l=l->next, irow+=vlines) {
- vlines=VLINES(l);
+ for(i=irow=0, l=scrline; l; l=l->next, irow+=vlines) {
+ if((vlines=VLINES(l)) > 1) i=1; /* i=1 if any line before fcur.l has vlines>1*/
if(fcur.l==l) {
if(irow+vlines>2*LINES2) statusflags|=S_DirtyScr;
- else statusflags|=S_DirtyDown; /* lines with vlines>1 require this */
while(irow+vlines>LINES2 && scrline->next) { /* Can't have fcur.l after screen end, move scrline down */
if(!(statusflags&S_DirtyScr)) wscrl(textwin, VLINES(scrline));
+ if(i) statusflags|=S_DirtyDown; /* lines with vlines>1 require this. */
irow -= VLINES(scrline);
if(scrline==fsel.l) selection=!selection; /* We just scrolled past the selection point */
scrline=scrline->next;