diff options
author | Sadrul Habib Chowdhury <sadrul@users.sourceforge.net> | 2010-03-08 10:01:26 -0500 |
---|---|---|
committer | Sadrul Habib Chowdhury <sadrul@users.sourceforge.net> | 2010-03-08 10:01:26 -0500 |
commit | eb4cea75f23df90ac955e001fc5c3e54062d97cb (patch) | |
tree | c91229ac93a8c8df63d543728fa6830634a92dae | |
parent | 7851249fa3e5a9ce00ad3bf8bd0b417acb335f84 (diff) | |
download | screen-eb4cea75f23df90ac955e001fc5c3e54062d97cb.tar.gz |
Fix refresh when double-cell characters end a line
Double cell characters that end a line are not properly displayed
when there are split regions. Takeshi Banse detected the problem and
a fix for it in Savannag bug #29106. A better fix for this was
applied in the unicode++ branch, but that won't work in 'master'.
This is approximately the same fix, in a slightly different way.
-rw-r--r-- | src/ChangeLog | 1 | ||||
-rw-r--r-- | src/layer.c | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 44ba74c..0ac432a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -91,6 +91,7 @@ Version 4.1.0 (??/??/20??): * Dick <dick@mrns.nl> * Gabriel <g2p.code@gmail.com> * Benjamin Andresen <bandresen@gmail.com> + * Takeshi Banse <takebi@laafc.net> * Maarten Billemont <lhunath@gmail.com> * Curtis Brown <mrbrown8@juno.com> * Cyril Brulebois <kibi@debian.org> 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); } |