aboutsummaryrefslogtreecommitdiffstats
path: root/pw.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-06 07:59:00 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-06 07:59:00 -0700
commitb6c963b80dfa4f55bb2397497a2eec73dfeac225 (patch)
tree646033385ba02612587367111ea3f12e8c45e945 /pw.c
parentb7df6166743d26c3020a6a3fcd5e55cda3f5a460 (diff)
downloadpw-b6c963b80dfa4f55bb2397497a2eec73dfeac225.tar.gz
pw-b6c963b80dfa4f55bb2397497a2eec73dfeac225.tar.bz2
pw-b6c963b80dfa4f55bb2397497a2eec73dfeac225.zip
Remove dubious addch(line, 0) and compensating hack elsewhere.
Diffstat (limited to 'pw.c')
-rw-r--r--pw.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pw.c b/pw.c
index 390976b..773fb67 100644
--- a/pw.c
+++ b/pw.c
@@ -380,7 +380,7 @@ static void drawline(pwstate *pw, const char *line, int lineno)
fputs(line, stdout);
columns -= len;
} else {
- int spaces = vsplit1 - len + 1;
+ int spaces = vsplit1 - len;
fputs(line, stdout);
for (int i = 0; i < spaces; i++)
putchar(' ');
@@ -995,7 +995,6 @@ int main(int argc, char **argv)
clearerr(stdin);
} else if (ch == '\n') {
nfds = 1;
- line = addch(line, 0);
if ((pw.stat & stat_grep)) {
int i;
for (i = 0; i < ngrep; i++)