Skip to content

Commit df784d0

Browse files
committed
fix top chart + 1.5.6
1 parent 7b2a34e commit df784d0

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

aur/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pkgname=ttop
2-
pkgver=1.5.5
2+
pkgver=1.5.6
33
pkgrel=1
44
pkgdesc="System monitoring tool with historical data service, triggers and top-like TUI"
55
url="https://github.com/inv2004/ttop"

src/ttop/tui.nim

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,12 @@ proc graphData(stats, live: seq[StatV2], sort: SortField, width: int, isLive: bo
164164
of Io: result = data.mapIt(float(it.io))
165165
else: result = data.mapIt(float(it.prc))
166166

167-
if result.len < width:
168-
let diff = width - stats.len
169-
result.insert(float(0).repeat(diff), 0)
170-
elif isLive and result.len > width:
171-
result = result[^width..^1]
167+
if isLive:
168+
if result.len > width:
169+
result = result[^width..^1]
170+
elif result.len < width:
171+
let diff = width - stats.len
172+
result.insert(float(0).repeat(diff), 0)
172173

173174
proc graph(tui: Tui, tb: var TerminalBuffer, stats, live: seq[StatV2],
174175
blog: string) =

ttop.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Package
22

3-
version = "1.5.5"
3+
version = "1.5.6"
44
author = "inv2004"
55
description = "Monitoring tool with historical snapshots and alerts"
66
license = "MIT"

0 commit comments

Comments
 (0)