aboutsummaryrefslogtreecommitdiffstats
path: root/pw.c
diff options
context:
space:
mode:
Diffstat (limited to 'pw.c')
-rw-r--r--pw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pw.c b/pw.c
index f44ce2a..f7e70ef 100644
--- a/pw.c
+++ b/pw.c
@@ -409,15 +409,17 @@ static void drawline(pwstate *pw, const char *line, int lineno)
int width = vsplit2;
int i = 0;
- if (vsplit1) {
+ if (vsplit1 || vs2pos) {
hlchar(pw, '|');
width--;
}
+
if (vs2pos < olen) {
int nchar = min(olen - vs2pos, width);
- const char *ptr = oline + vs2pos;
+ const char *ptr = oline + vs2pos + i;
for (; i < nchar; i++)
putchar(*ptr++);
+ endmark = 1;
}
for (; i < width; i++)
putchar(' ');