From 885e5cad27e126f6761eefd0d460e0b374d2e4d1 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Fri, 8 Nov 2002 15:54:46 +0000 Subject: [w3m-dev 03387] Re: tab browser * buffer.c (newBuffer): buf->LINES initialize (gotoLine): use buf->LINES (gotoRealLine): use buf->LINES * display.c (displayBuffer): check by buf->LINES (redrawNLine): buf->LINES (redrawLine): buf->LINES (redrawLineImage): no need buf->rootY (cursorDown): buf->LINES (arrangeCursor): buf->LINES * etc.c (columnSkip): buf->LINES (lineSkip): buf->LINES (currentLineSkip): buf->LINES * fm.h (Buffer): add LINES * main.c (nscroll): Currentbuf->LINES (pgFore): Currentbuf->LINES (pgBack): Currentbuf->LINES (ctrCsrV): Currentbuf->LINES (movD): Currentbuf->LINES (movU): Currentbuf->LINES (_goLine): Currentbuf->LINES (drawAnchorCursor): Currentbuf->LINES (setOpt): B_REDRAW_IMAGE (newT): B_REDRAW_IMAGE (closeT): B_REDRAW_IMAGE (nextT): B_REDRAW_IMAGE (prevT): B_REDRAW_IMAGE (moveTab): B_NORMAL From: Hironori SAKAMOTO --- etc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'etc.c') diff --git a/etc.c b/etc.c index 33a01c6..2ea7868 100644 --- a/etc.c +++ b/etc.c @@ -1,4 +1,4 @@ -/* $Id: etc.c,v 1.36 2002/11/06 15:05:34 ukai Exp $ */ +/* $Id: etc.c,v 1.37 2002/11/08 15:54:47 ukai Exp $ */ #include "fm.h" #include #include "myctype.h" @@ -42,7 +42,7 @@ columnSkip(Buffer *buf, int offset) { int i, maxColumn; int column = buf->currentColumn + offset; - int nlines = LASTLINE + 1 - buf->rootY; + int nlines = buf->LINES + 1; Line *l; maxColumn = 0; @@ -91,8 +91,7 @@ lineSkip(Buffer *buf, Line *line, int offset, int last) #ifdef NEXTPAGE_TOPLINE if (!nextpage_topline) #endif - for (i = (LASTLINE - 1 - buf->rootY) - (buf->lastLine->linenumber - - l->linenumber); + for (i = buf->LINES - 1 - (buf->lastLine->linenumber - l->linenumber); i > 0 && l->prev != NULL; i--, l = l->prev) ; return l; } @@ -104,7 +103,7 @@ currentLineSkip(Buffer *buf, Line *line, int offset, int last) Line *l = line; if (buf->pagerSource && !(buf->bufferprop & BP_CLOSE)) { - n = line->linenumber + offset + LASTLINE - buf->rootY; + n = line->linenumber + offset + buf->LINES; if (buf->lastLine->linenumber < n) getNextPage(buf, n - buf->lastLine->linenumber); while ((last || (buf->lastLine->linenumber < n)) && -- cgit v1.2.3