From: nishi Date: Tue, 30 Jan 2024 03:34:30 +0000 (+0000) Subject: better scroll X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=821704cf3668ef7626a63d29dfe106931ee28a26;p=libw3.git better scroll git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@140 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Example/w3b/w3b.c b/Example/w3b/w3b.c index 2f3c4ba..e74c581 100644 --- a/Example/w3b/w3b.c +++ b/Example/w3b/w3b.c @@ -204,7 +204,7 @@ void html_handler(char* tagname, char* attr) { fflush(stdout); if(x >= termw) { if(nl >= start) { - nl++; + nl += x / termw; x = x % termw; } } @@ -263,7 +263,7 @@ void text_handler(char* data) { x += strlen(text); if(x >= termw) { if(nl >= start) { - nl++; + nl += x / termw; x = x % termw; } }