From 47590ac856029fa5a11c8830d58923aadc8aff78 Mon Sep 17 00:00:00 2001 From: Sadrul Habib Chowdhury Date: Wed, 17 Mar 2010 12:11:43 -0400 Subject: [PATCH] Mark the right-side of a region with '|'s. When a layer displayed within a canvas is smaller than the available area, we show '-' at the bottom, and now '|' on the right to mark the actual size of the layer in the canvas. --- src/display.c | 7 +++++++ src/layer.c | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/display.c b/src/display.c index 5fc5f4b..2b3eca3 100644 --- a/src/display.c +++ b/src/display.c @@ -2405,6 +2405,13 @@ int y, from, to, isblank; yy = y - lvp->v_yoff; xx = to < lvp->v_xe ? to : lvp->v_xe; + if (lcv->c_layer && lcv->c_xoff + lcv->c_layer->l_width == from) + { + GotoPos(from, y); + SetRendition(&mchar_blank); + PUTCHARLP('|'); + from++; + } if (lcv->c_layer && yy == lcv->c_layer->l_height) { GotoPos(from, y); diff --git a/src/layer.c b/src/layer.c index b7cea6a..4ae587f 100644 --- a/src/layer.c +++ b/src/layer.c @@ -594,6 +594,16 @@ int uself; xe2 = vp->v_xe; display = cv->c_display; ClearArea(xs2, ys2, vp->v_xs, vp->v_xe, xe2, ye2, bce, uself); + if (xe == l->l_width - 1 && xe2 > vp->v_xoff + xe) + { + int y; + SetRendition(&mchar_blank); + for (y = ys2; y <= ye2; y++) + { + GotoPos(xe + vp->v_xoff + 1, y); + PUTCHARLP('|'); + } + } #endif } } -- 2.11.4.GIT