commit c139a2463d940fbccc4ad2bda37a580dd0637a2e
parent 525edfd656bb9a05926be60479431eeabee2024e
Author: ukai <ukai>
Date: Thu, 6 Mar 2003 14:30:19 +0000
[w3m-dev 03794] displayBuffer() when CurrentTab == NULL.
* display.c (displayBuffer): check buf
* linein.c (inputLineHistSearch): check CurrentTab
(next_dcompl): check CurrentTab
(_editor): check CurrentTab
* main.c (resize_screen): check CurrentTab
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat:
4 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,12 @@
+2003-03-06 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 03794] displayBuffer() when CurrentTab == NULL.
+ * display.c (displayBuffer): check buf
+ * linein.c (inputLineHistSearch): check CurrentTab
+ (next_dcompl): check CurrentTab
+ (_editor): check CurrentTab
+ * main.c (resize_screen): check CurrentTab
+
2003-03-06 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev 03793] incremental search fix
diff --git a/display.c b/display.c
@@ -372,6 +372,8 @@ displayBuffer(Buffer *buf, int mode)
Str msg;
int ny = 0;
+ if (!buf)
+ return;
if (buf->topLine == NULL && readBufferCache(buf) == 0) { /* clear_buffer */
mode = B_FORCE_REDRAW;
}
diff --git a/linein.c b/linein.c
@@ -287,8 +287,10 @@ inputLineHistSearch(char *prompt, char *def_str, int flag, Hist *hist,
break;
} while (i_cont);
- if (need_redraw)
- displayBuffer(Currentbuf, B_FORCE_REDRAW);
+ if (CurrentTab) {
+ if (need_redraw)
+ displayBuffer(Currentbuf, B_FORCE_REDRAW);
+ }
#ifdef SUPPORT_WIN9X_CONSOLE_MBCS
disable_win9x_console_input();
@@ -755,7 +757,8 @@ next_dcompl(int next)
if (cm_mode == CPL_NEVER || cm_mode & CPL_OFF)
return;
cm_disp_clear = FALSE;
- displayBuffer(Currentbuf, B_FORCE_REDRAW);
+ if (CurrentTab)
+ displayBuffer(Currentbuf, B_FORCE_REDRAW);
if (LASTLINE >= 3) {
comment = TRUE;
@@ -1150,5 +1153,6 @@ _editor(void)
Strcat_char(strBuf, *p);
}
CLen = CPos = setStrType(strBuf, strProp);
- displayBuffer(Currentbuf, B_FORCE_REDRAW);
+ if (CurrentTab)
+ displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
diff --git a/main.c b/main.c
@@ -1375,7 +1375,7 @@ resize_screen(void)
{
setlinescols();
setupscreen();
- if (Currentbuf)
+ if (CurrentTab)
displayBuffer(Currentbuf, B_FORCE_REDRAW);
}
#endif /* SIGWINCH */