w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 52fcf5088376e8529b4d10afd963cea28f97482f
parent 379f2d0d0bcabccb01a45ea788561d972689a60d
Author: inu <inu>
Date:   Wed, 30 May 2007 04:47:24 +0000

fix for tab browsing. [w3m-dev 04266]

Diffstat:
MChangeLog | 5+++++
Mfm.h | 7+++++++
Mmain.c | 15++++++++++++---
3 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,5 +1,10 @@ 2007-05-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 04266] Bug fix when tab browsing + * fm.h, main.c: fix for tab browsing. + +2007-05-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 04265] compile error when #undef USE_BG_COLOR * terms.c: add #ifdef __CYGWIN__. diff --git a/fm.h b/fm.h @@ -523,6 +523,13 @@ typedef struct _DownloadList { } DownloadList; #define DOWNLOAD_LIST_TITLE "Download List Panel" +#define COPY_BUFROOT(dstbuf, srcbuf) {\ + (dstbuf)->rootX = (srcbuf)->rootX; \ + (dstbuf)->rootY = (srcbuf)->rootY; \ + (dstbuf)->COLS = (srcbuf)->COLS; \ + (dstbuf)->LINES = (srcbuf)->LINES; \ +} + #define COPY_BUFPOSITION(dstbuf, srcbuf) {\ (dstbuf)->topLine = (srcbuf)->topLine; \ (dstbuf)->currentLine = (srcbuf)->currentLine; \ diff --git a/main.c b/main.c @@ -4717,8 +4717,10 @@ DEFUN(reload, RELOAD, "Reload buffer") buf->linkBuffer[LB_N_FRAME] = fbuf; pushBuffer(buf); Currentbuf = buf; - if (Currentbuf->firstLine) + if (Currentbuf->firstLine) { + COPY_BUFROOT(Currentbuf, &sbuf); restorePosition(Currentbuf, &sbuf); + } displayBuffer(Currentbuf, B_FORCE_REDRAW); return; } @@ -4783,8 +4785,10 @@ DEFUN(reload, RELOAD, "Reload buffer") } Currentbuf->search_header = sbuf.search_header; Currentbuf->form_submit = sbuf.form_submit; - if (Currentbuf->firstLine) + if (Currentbuf->firstLine) { + COPY_BUFROOT(Currentbuf, &sbuf); restorePosition(Currentbuf, &sbuf); + } displayBuffer(Currentbuf, B_FORCE_REDRAW); } @@ -5215,6 +5219,9 @@ do_mouse_action(int btn, int x, int y) cursorXY(Currentbuf, cx, cy); } } + else { + return; + } if (!(map && map->func)) map = &mouse_action.default_map[btn]; if (map && map->func) { @@ -6555,8 +6562,10 @@ DEFUN(ldDL, DOWNLOAD_LIST, "Display download list panel") return; } buf->bufferprop |= (BP_INTERNAL | BP_NO_URL); - if (replace) + if (replace) { + COPY_BUFROOT(buf, Currentbuf); restorePosition(buf, Currentbuf); + } if (!replace && open_tab_dl_list) { _newT(); new_tab = TRUE;