Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2016-02-19 07:15:19 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-02-19 07:15:19 +0300
commit8b8f522621d20ed43583d28f28f394dac0011ea6 (patch)
treeb7eb25e5f9f463ba82862e9bc7e9b588fe6bf516
parenta9250b4eb9f1383acecce3e3f99d53cbaa657bd4 (diff)
cmd: fix UI with lots of peers
`linesRemaining` wasn’t being decremented each time line() was called.
-rwxr-xr-xbin/cmd.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/cmd.js b/bin/cmd.js
index 29ceb35..94817fd 100755
--- a/bin/cmd.js
+++ b/bin/cmd.js
@@ -558,17 +558,17 @@ function drawTorrent (torrent) {
return linesRemaining > 4
})
+ line('{60:}')
if (torrent.numPeers > peerslisted) {
- line('{60:}')
line('... and %s more', torrent.numPeers - peerslisted)
}
- line('{60:}')
clivas.flush(true)
- }
- function line () {
- clivas.line.apply(clivas, arguments)
+ function line () {
+ clivas.line.apply(clivas, arguments)
+ linesRemaining -= 1
+ }
}
}