summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/Monitors
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-11-30 06:17:18 +0000
committerjao <jao@gnu.org>2022-11-30 06:17:18 +0000
commitc7d9fd8fe08f6474253733fd537a1b07251f3633 (patch)
tree3d5e0bb6315daa59be4cd0d55eb7cb368365cabf /src/Xmobar/Plugins/Monitors
parent76e3125147cc5f98c35f516fc5174feb20becb28 (diff)
downloadxmobar-c7d9fd8fe08f6474253733fd537a1b07251f3633.tar.gz
xmobar-c7d9fd8fe08f6474253733fd537a1b07251f3633.tar.bz2
linting
Diffstat (limited to 'src/Xmobar/Plugins/Monitors')
-rw-r--r--src/Xmobar/Plugins/Monitors/Common/Output.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Common/Output.hs b/src/Xmobar/Plugins/Monitors/Common/Output.hs
index bd60710..2d0e194 100644
--- a/src/Xmobar/Plugins/Monitors/Common/Output.hs
+++ b/src/Xmobar/Plugins/Monitors/Common/Output.hs
@@ -140,7 +140,7 @@ showWithUnits d n x
padString :: Int -> Int -> String -> Bool -> String -> String -> String
padString mnw mxw pad pr ellipsis s =
let len = length s
- rmin = if mnw < 0 then 0 else mnw
+ rmin = max mnw 0
rmax = if mxw <= 0 then max len rmin else mxw
(rmn, rmx) = if rmin <= rmax then (rmin, rmax) else (rmax, rmin)
rlen = min (max rmn len) rmx