diff options
Diffstat (limited to 'src/layer.c')
-rw-r--r-- | src/layer.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/layer.c b/src/layer.c index 34cd6a3..b7cea6a 100644 --- a/src/layer.c +++ b/src/layer.c @@ -1197,6 +1197,7 @@ int pause; struct canvas *cv; struct display *olddisplay = display; int line; + struct win *win; pause = !!pause; @@ -1215,6 +1216,11 @@ int pause; layer->l_pause.bottom == -1) return; + if (layer->l_layfn == &WinLf) /* Currently, this will always be the case! */ + win = layer->l_data; + else + win = NULL; + for (cv = layer->l_cvlist; cv; cv = cv->c_lnext) { struct viewport *vp; @@ -1240,6 +1246,15 @@ int pause; if (xs < vp->v_xs) xs = vp->v_xs; if (xe > vp->v_xe) xe = vp->v_xe; +#if defined(DW_CHARS) && defined(UTF8) + if (layer->l_encoding == UTF8 && xe < vp->v_xe && win) + { + struct mline *ml = win->w_mlines + line; + if (dw_left(ml, xe, UTF8)) + xe++; + } +#endif + if (xs <= xe) RefreshLine(line + vp->v_yoff, xs, xe, 0); } |