home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48d8506
)
Client: Fix bug adding win width padding to log lines when not needed.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 5 Mar 2016 11:37:18 +0000
(12:37 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 5 Mar 2016 11:37:18 +0000
(12:37 +0100)
client/windows.py
patch
|
blob
|
history
diff --git
a/client/windows.py
b/client/windows.py
index 9eddc1cb33beb722e269c30edcca0b5cdcd6b81f..3966d0c4d20312b9cc99b8f746ac8a67928f59d8 100644
(file)
--- a/
client/windows.py
+++ b/
client/windows.py
@@
-108,7
+108,8
@@
def win_log(self):
number_of_lines = 0
for line in world_data["log"]:
number_of_lines += math.ceil(len(line) / win_size[1])
- padding_size = win_size[1] - (len(line) % win_size[1])
+ mod = len(line) % win_size[1]
+ padding_size = 0 if mod == 0 else win_size[1] - mod
winmap += line + (padding_size * " ")
if number_of_lines < win_size[0]:
winmap = (" " * win_size[1] * (win_size[0] - number_of_lines)) + winmap