diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-05-03 21:37:35 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-05-03 21:37:35 -0700 |
commit | 39c3e17e5fa989a5db5825ceb9be54ba77c7b92d (patch) | |
tree | 95822ece2e5d49172622fe0931b1a41745ef1aa3 | |
parent | 0d7b3425f8eb4c7754d8a18c438af0541fa9ba91 (diff) | |
download | pw-39c3e17e5fa989a5db5825ceb9be54ba77c7b92d.tar.gz pw-39c3e17e5fa989a5db5825ceb9be54ba77c7b92d.tar.bz2 pw-39c3e17e5fa989a5db5825ceb9be54ba77c7b92d.zip |
Line number cosmetic issue.
When the FIFO isn't full, we output lines. In numbered mode,
line numbers aren't printed, so things look funny. Let's
print zeros. These will refresh to the actual values.
-rw-r--r-- | pw.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -324,7 +324,7 @@ static void drawline(const char *line, unsigned hpos, int columns, int lineno) { size_t len = dslen(line); - if (lineno > 0) + if (lineno >= 0) columns -= printf("%3d ", lineno); if ((size_t) hpos <= len) { @@ -931,7 +931,7 @@ int main(int argc, char **argv) snapshot[0] = resizebuf(snapshot[0], snaplines[0], snaplines[0] + 1); snapshot[0][snaplines[0]++] = dsref(line); clrline(stat); - drawline(line, hpos, columns, -1); + drawline(line, hpos, columns, (stat & stat_lino) ? 0: -1); drawstatus(hist, columns, stat, curcmd); } } |