[w3m-dev 03598] restore cursor when download list panel is updated.

* main.c (stopDownload): delete->replace
	(ldDL): use DownloadListBuffer()
From: Hiroaki Shimotsu <shim@d5.bs1.fc.nec.co.jp>
This commit is contained in:
Fumitoshi UKAI
2002-12-24 17:33:31 +00:00
parent dfdc4f3cf2
commit 3e6431e412
2 changed files with 25 additions and 18 deletions

View File

@@ -1,3 +1,9 @@
2002-12-25 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03598] restore cursor when download list panel is updated.
* main.c (stopDownload): delete->replace
(ldDL): use DownloadListBuffer()
2002-12-25 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03597] Re: meta refresh
@@ -6062,4 +6068,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
$Id: ChangeLog,v 1.644 2002/12/24 17:28:48 ukai Exp $
$Id: ChangeLog,v 1.645 2002/12/24 17:33:31 ukai Exp $

35
main.c
View File

@@ -1,4 +1,4 @@
/* $Id: main.c,v 1.178 2002/12/24 17:28:48 ukai Exp $ */
/* $Id: main.c,v 1.179 2002/12/24 17:33:31 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -6233,17 +6233,17 @@ stopDownload(void)
void
ldDL(void)
{
Buffer *prev = Currentbuf;
int delete = FALSE, new_tab = FALSE;
Buffer *buf;
int replace = FALSE, new_tab = FALSE;
#ifdef USE_ALARM
int reload;
#endif
if (Currentbuf->bufferprop & BP_INTERNAL &&
!strcmp(Currentbuf->buffername, DOWNLOAD_LIST_TITLE))
delete = TRUE;
replace = TRUE;
if (!FirstDL) {
if (delete) {
if (replace) {
if (Currentbuf == Firstbuf && Currentbuf->nextBuffer == NULL) {
if (nTab > 1)
deleteTab(CurrentTab);
@@ -6254,29 +6254,30 @@ ldDL(void)
}
return;
}
if (!delete && open_tab_dl_list) {
_newT();
prev = Currentbuf;
delete = TRUE;
new_tab = TRUE;
}
#ifdef USE_ALARM
reload = checkDownloadList();
#endif
cmd_loadBuffer(DownloadListBuffer(), BP_NO_URL, LB_NOLINK);
if (Currentbuf == prev) {
if (new_tab)
deleteTab(CurrentTab);
displayBuffer(Currentbuf, B_FORCE_REDRAW);
buf = DownloadListBuffer();
if (!buf) {
displayBuffer(Currentbuf, B_NORMAL);
return;
}
if (delete)
buf->bufferprop |= (BP_INTERNAL | BP_NO_URL);
if (replace)
restorePosition(buf, Currentbuf);
if (!replace && open_tab_dl_list) {
_newT();
new_tab = TRUE;
}
pushBuffer(buf);
if (replace || new_tab)
deletePrevBuf();
#ifdef USE_ALARM
if (reload)
Currentbuf->event = setAlarmEvent(Currentbuf->event, 1, AL_IMPLICIT,
FUNCNAME_reload, NULL);
#endif
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
static void