summaryrefslogtreecommitdiff
path: root/src/display.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/display.c')
-rw-r--r--src/display.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/display.c b/src/display.c
index 8161e1e..64ea856 100644
--- a/src/display.c
+++ b/src/display.c
@@ -2163,7 +2163,7 @@ int start, max;
{
int chars = strlen_onscreen((unsigned char *)(s + start), (unsigned char *)(s + max));
D_encoding = 0;
- PutWinMsg(s, start, max + ((max - start) - chars)); /* Multibyte count */
+ PutWinMsg(s, start, max);
D_encoding = UTF8;
D_x -= (max - chars); /* Yak! But this is necessary to count for
the fact that not every byte represents a
@@ -2257,15 +2257,11 @@ void
RefreshHStatus()
{
char *buf;
-#ifdef UTF8
- int extrabytes = strlen(hstatusstring) - strlen_onscreen(hstatusstring, NULL);
-#else
- int extrabytes = 0;
-#endif
+
evdeq(&D_hstatusev);
if (D_status == STATUS_ON_HS)
return;
- buf = MakeWinMsgEv(hstatusstring, D_fore, '%', (D_HS && D_has_hstatus == HSTATUS_HS && D_WS > 0) ? D_WS : D_width - !D_CLP + extrabytes, &D_hstatusev, 0);
+ buf = MakeWinMsgEv(hstatusstring, D_fore, '%', (D_HS && D_has_hstatus == HSTATUS_HS && D_WS > 0) ? D_WS : D_width - !D_CLP, &D_hstatusev, 0);
if (buf && *buf)
{
ShowHStatus(buf);
@@ -2360,13 +2356,8 @@ int y, from, to, isblank;
{
if (y == cv->c_ye + 1 && from >= cv->c_xs && from <= cv->c_xe)
{
-#ifdef UTF8
- int extrabytes = strlen(captionstring) - strlen_onscreen(captionstring, NULL);
-#else
- int extrabytes = 0;
-#endif
p = Layer2Window(cv->c_layer);
- buf = MakeWinMsgEv(captionstring, p, '%', cv->c_xe - cv->c_xs + (cv->c_xe + 1 < D_width || D_CLP) + extrabytes, &cv->c_captev, 0);
+ buf = MakeWinMsgEv(captionstring, p, '%', cv->c_xe - cv->c_xs + (cv->c_xe + 1 < D_width || D_CLP), &cv->c_captev, 0);
if (cv->c_captev.timeout.tv_sec)
evenq(&cv->c_captev);
xx = to > cv->c_xe ? cv->c_xe : to;
@@ -2375,7 +2366,7 @@ int y, from, to, isblank;
SetRendition(&mchar_so);
if (l > xx - cv->c_xs + 1)
l = xx - cv->c_xs + 1;
- l = PrePutWinMsg(buf, from - cv->c_xs, l + extrabytes);
+ l = PrePutWinMsg(buf, from - cv->c_xs, l);
from = cv->c_xs + l;
for (; from <= xx; from++)
PUTCHARLP(' ');