diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | buffer.c | 10 | ||||
-rw-r--r-- | display.c | 15 | ||||
-rw-r--r-- | proto.h | 3 |
4 files changed, 31 insertions, 7 deletions
@@ -1,5 +1,15 @@ 2001-12-05 Tsutomu Okada <okada@furuno.co.jp> + * [w3m-dev 02616] + * buffer.c (gotoLine): use set_delayed_message instead of disp_message + * buffer.c (gotoRealLine): ditto + * display.c (delayed_msg): added + * display.c (displayBuffer): display deleyed_msg if it is set + * display.c (set_delayed_message): added + * proto.h (set_delayed_message): added + +2001-12-05 Tsutomu Okada <okada@furuno.co.jp> + * [w3m-dev 02615] * main.c (goLine): _goLine() called twice when prec_num was set @@ -1,4 +1,4 @@ -/* $Id: buffer.c,v 1.7 2001/11/29 09:34:14 ukai Exp $ */ +/* $Id: buffer.c,v 1.8 2001/12/04 16:33:08 ukai Exp $ */ #include "fm.h" #ifdef USE_MOUSE @@ -240,14 +240,14 @@ gotoLine(Buffer *buf, int n) } if (l->linenumber > n) { sprintf(msg, "First line is #%ld", l->linenumber); - disp_message(msg, FALSE); + set_delayed_message(msg); buf->topLine = buf->currentLine = l; return; } if (buf->lastLine->linenumber < n) { l = buf->lastLine; sprintf(msg, "Last line is #%ld", buf->lastLine->linenumber); - disp_message(msg, FALSE); + set_delayed_message(msg); buf->currentLine = l; buf->topLine = lineSkip(buf, buf->currentLine, -(LASTLINE - 1), FALSE); return; @@ -282,14 +282,14 @@ gotoRealLine(Buffer *buf, int n) } if (l->real_linenumber > n) { sprintf(msg, "First line is #%ld", l->real_linenumber); - disp_message(msg, FALSE); + set_delayed_message(msg); buf->topLine = buf->currentLine = l; return; } if (buf->lastLine->real_linenumber < n) { l = buf->lastLine; sprintf(msg, "Last line is #%ld", buf->lastLine->real_linenumber); - disp_message(msg, FALSE); + set_delayed_message(msg); buf->currentLine = l; buf->topLine = lineSkip(buf, buf->currentLine, -(LASTLINE - 1), FALSE); return; @@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.11 2001/12/02 16:26:08 ukai Exp $ */ +/* $Id: display.c,v 1.12 2001/12/04 16:33:08 ukai Exp $ */ #include <signal.h> #include "fm.h" @@ -190,6 +190,8 @@ static Buffer *save_current_buf = NULL; int in_check_url = FALSE; +char *delayed_msg = NULL; + void displayBuffer(Buffer *buf, int mode) { @@ -315,6 +317,11 @@ displayBuffer(Buffer *buf, int mode) Strcat_charp(msg, "\tNo Line"); clear(); } + if (delayed_msg != NULL) { + disp_message(delayed_msg, FALSE); + delayed_msg = NULL; + refresh(); + } standout(); message(msg->ptr, buf->cursorX + buf->rootX, buf->cursorY); standend(); @@ -859,6 +866,12 @@ disp_message_nomouse(char *s, int redraw_current) #endif void +set_delayed_message(char *s) +{ + delayed_msg = allocStr(s, -1); +} + +void cursorUp(Buffer *buf, int n) { if (buf->firstLine == NULL) @@ -1,4 +1,4 @@ -/* $Id: proto.h,v 1.12 2001/12/03 18:17:51 ukai Exp $ */ +/* $Id: proto.h,v 1.13 2001/12/04 16:33:08 ukai Exp $ */ /* * This file was automatically generated by version 1.7 of cextract. * Manual editing not recommended. @@ -219,6 +219,7 @@ extern void disp_message_nomouse(char *s, int redraw_current); #else #define disp_message_nomouse disp_message #endif +extern void set_delayed_message(char *s); extern void cursorUp(Buffer *buf, int n); extern void cursorDown(Buffer *buf, int n); extern void cursorUpDown(Buffer *buf, int n); |