Skip to content

Commit

Permalink
fix header line
Browse files Browse the repository at this point in the history
  • Loading branch information
inv2004 committed Jan 23, 2023
1 parent 068f966 commit 0b25bd8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/ttop/tui.nim
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ proc header(tb: var TerminalBuffer, info: FullInfoRef, hist, cnt: int,
info.sys.datetime.format(
"yyyy-MM-dd HH:mm:ss")
if hist > 0:
tb.write fmt" {blog}: {hist} / {cnt}"
tb.write fmt" {blog}: {hist} / {cnt} "
elif blog == "":
tb.write fmt" autoupdate log: empty"
tb.write fmt" autoupdate log: empty "
else:
tb.write fmt" autoupdate {blog}: {cnt}"
let x = tb.getCursorYPos()
if tb.width - 71 > 0:
tb.write ' '.repeat(tb.width-71)
tb.setCursorXPos x
tb.write fmt" autoupdate {blog}: {cnt} "
let curX = tb.getCursorXPos()
if tb.width - curX - 2 > 0:
tb.write ' '.repeat(tb.width - curX - 2)
tb.setCursorXPos curX
let procStr = fmt"PROCS: {$info.pidsInfo.len}"
tb.writeR procStr
tb.setCursorPos(offset, 2)
Expand Down

0 comments on commit 0b25bd8

Please sign in to comment.