diff options
-rw-r--r-- | pw.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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(' '); |