From 691bc6df988c57468494472ce34ee38cbb31d837 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Tue, 4 Dec 2001 16:33:08 +0000 Subject: [w3m-dev 02616] From: Tsutomu Okada --- ChangeLog | 10 ++++++++++ buffer.c | 10 +++++----- display.c | 15 ++++++++++++++- proto.h | 3 ++- 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index bb7c321..6e01598 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2001-12-05 Tsutomu Okada + + * [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 * [w3m-dev 02615] diff --git a/buffer.c b/buffer.c index 8569f1f..88a6e14 100644 --- a/buffer.c +++ b/buffer.c @@ -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; diff --git a/display.c b/display.c index 4b99816..155b514 100644 --- a/display.c +++ b/display.c @@ -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 #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(); @@ -858,6 +865,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) { diff --git a/proto.h b/proto.h index 19eda87..3ef44e0 100644 --- a/proto.h +++ b/proto.h @@ -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); -- cgit v1.2.3