summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2010-11-20 20:35:07 +0000
committerHisham Muhammad <hisham@gobolinux.org>2010-11-20 20:35:07 +0000
commit2960a8162ef732dc2aab592ead1acd8d7d063b50 (patch)
tree18006eab19df0f20b6fa93c433b3cb454cc263f2
parent10f007e07e90cd64ce322f7a1a7e4f9900ff7990 (diff)
BUGFIX: Fix alignment for display of memory values above 100G (sign of the times!)
(thanks to Jan van Haarst for the report.) Closes #2865619.
-rw-r--r--ChangeLog6
-rw-r--r--Process.c11
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index c5a86ca2..99eedb0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,7 +22,11 @@ What's new in version 0.9
(thanks to Daniel Schuler)
* Improve battery meter support
(thanks to Richard W.)
-* Fix IO-wait color in "Black on White" scheme
+* BUGFIX: Fix IO-wait color in "Black on White" scheme
+* BUGFIX: Fix search by process name when list is filtered by user.
+ (thanks to Sergej Pupykin for the report.)
+* BUGFIX: Fix alignment for display of memory values above 100G (sign of the times!)
+ (thanks to Jan van Haarst for the report.)
What's new in version 0.8.3
diff --git a/Process.c b/Process.c
index 4885f384..30e243b1 100644
--- a/Process.c
+++ b/Process.c
@@ -229,9 +229,14 @@ static void Process_printLargeNumber(Process* this, RichString *str, unsigned lo
char buffer[11];
int len;
if(number >= (10 * ONE_M)) {
- len = snprintf(buffer, 10, "%3.1fG ", (float)number / ONE_M);
- RichString_appendn(str, CRT_colors[LARGE_NUMBER], buffer, len);
- } else if(number >= (100000)) {
+ if(number >= (100 * ONE_M)) {
+ len = snprintf(buffer, 10, "%4ldG ", number / ONE_M);
+ RichString_appendn(str, CRT_colors[LARGE_NUMBER], buffer, len);
+ } else {
+ len = snprintf(buffer, 10, "%3.1fG ", (float)number / ONE_M);
+ RichString_appendn(str, CRT_colors[LARGE_NUMBER], buffer, len);
+ }
+ } else if (number >= 100000) {
len = snprintf(buffer, 10, "%4ldM ", number / ONE_K);
int attr = this->pl->highlightMegabytes
? CRT_colors[PROCESS_MEGABYTES]

© 2014-2024 Faster IT GmbH | imprint | privacy policy