diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-08 15:54:46 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-08 15:54:46 +0000 |
commit | 885e5cad27e126f6761eefd0d460e0b374d2e4d1 (patch) | |
tree | 0fc77f170b704bef8c43ab180a17b42a2687c80a /buffer.c | |
parent | [w3m-dev 03386] Re: Interrupt in no_proxy_check() (diff) | |
download | w3m-885e5cad27e126f6761eefd0d460e0b374d2e4d1.tar.gz w3m-885e5cad27e126f6761eefd0d460e0b374d2e4d1.zip |
[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 <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | buffer.c | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/* $Id: buffer.c,v 1.13 2002/03/15 19:02:40 ukai Exp $ */ +/* $Id: buffer.c,v 1.14 2002/11/08 15:54:46 ukai Exp $ */ #include "fm.h" #ifdef USE_MOUSE @@ -32,6 +32,7 @@ newBuffer(int width) bzero((void *)n, sizeof(Buffer)); n->width = width; n->COLS = COLS; + n->LINES = LASTLINE; n->currentURL.scheme = SCM_UNKNOWN; n->baseURL = NULL; n->baseTarget = NULL; @@ -252,15 +253,16 @@ gotoLine(Buffer *buf, int n) sprintf(msg, "Last line is #%ld", buf->lastLine->linenumber); set_delayed_message(msg); buf->currentLine = l; - buf->topLine = lineSkip(buf, buf->currentLine, -(LASTLINE - 1), FALSE); + buf->topLine = lineSkip(buf, buf->currentLine, -(buf->LINES - 1), + FALSE); return; } for (; l != NULL; l = l->next) { if (l->linenumber >= n) { buf->currentLine = l; if (n < buf->topLine->linenumber || - buf->topLine->linenumber + LASTLINE <= n) - buf->topLine = lineSkip(buf, l, -(LASTLINE + 1) / 2, FALSE); + buf->topLine->linenumber + buf->LINES <= n) + buf->topLine = lineSkip(buf, l, -(buf->LINES + 1) / 2, FALSE); break; } } @@ -294,15 +296,16 @@ gotoRealLine(Buffer *buf, int n) sprintf(msg, "Last line is #%ld", buf->lastLine->real_linenumber); set_delayed_message(msg); buf->currentLine = l; - buf->topLine = lineSkip(buf, buf->currentLine, -(LASTLINE - 1), FALSE); + buf->topLine = lineSkip(buf, buf->currentLine, -(buf->LINES - 1), + FALSE); return; } for (; l != NULL; l = l->next) { if (l->real_linenumber >= n) { buf->currentLine = l; if (n < buf->topLine->real_linenumber || - buf->topLine->real_linenumber + LASTLINE <= n) - buf->topLine = lineSkip(buf, l, -(LASTLINE + 1) / 2, FALSE); + buf->topLine->real_linenumber + buf->LINES <= n) + buf->topLine = lineSkip(buf, l, -(buf->LINES + 1) / 2, FALSE); break; } } |