w3m

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

commit bdd52abe9520fd64adc965a04e71549d91b67231
parent 9f81ebaa561502812f227188a03f4d4c82657ac5
Author: ukai <ukai>
Date:   Tue,  4 Dec 2001 16:33:08 +0000

[w3m-dev 02616]
From: Tsutomu Okada <okada@furuno.co.jp>

Diffstat:
MChangeLog | 10++++++++++
Mbuffer.c | 8++++----
Mdisplay.c | 13+++++++++++++
Mproto.h | 1+
4 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -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 diff --git a/buffer.c b/buffer.c @@ -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 @@ -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) diff --git a/proto.h b/proto.h @@ -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);