(battery-linux-proc-acpi): Check `capacity' for non-nil
before comparing with `low' and `warn'.
This commit is contained in:
parent
ba44fca9cd
commit
c93b1b4b30
1 changed files with 2 additions and 2 deletions
|
@ -391,8 +391,8 @@ The following %-sequences are provided:
|
|||
rate-type)) "N/A"))
|
||||
(cons ?B (or charging-state "N/A"))
|
||||
(cons ?b (or (and (string= charging-state "charging") "+")
|
||||
(and (< capacity low) "!")
|
||||
(and (< capacity warn) "-")
|
||||
(and capacity (< capacity low) "!")
|
||||
(and capacity (< capacity warn) "-")
|
||||
""))
|
||||
(cons ?h (or (and hours (number-to-string hours)) "N/A"))
|
||||
(cons ?m (or (and minutes (number-to-string minutes)) "N/A"))
|
||||
|
|
Loading…
Add table
Reference in a new issue