summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/X11/Types.hs
diff options
context:
space:
mode:
authorSibi Prabakaran <sibi@psibi.in>2020-05-10 19:43:56 +0530
committerSibi Prabakaran <sibi@psibi.in>2020-05-10 19:43:56 +0530
commit3e9e1cb9d300e13109206496d825351c4f41cc1c (patch)
treed40f6c9f185ea4b01b6652e4178a5f28e450c8fa /src/Xmobar/X11/Types.hs
parent6f3b730415147041ff34558fe7292a76dc87b1f0 (diff)
downloadxmobar-3e9e1cb9d300e13109206496d825351c4f41cc1c.tar.gz
xmobar-3e9e1cb9d300e13109206496d825351c4f41cc1c.tar.bz2
Fix crashes/busy looping happening via index
Right now, with the `StdinReader` plugin enabled - you can crash/cause busy looping of xmobar if the following html file is opened: ``` <html> <head> <title>hello <fn=1>string</fn> </title> </head> </html> ``` More details about this bug is here: https://github.com/jaor/xmobar/issues/442#issuecomment-625706001 This MR also fixes another bug which produces a crash in xmobar if you pass non integer items between fn: <fn=crash>
Diffstat (limited to 'src/Xmobar/X11/Types.hs')
-rw-r--r--src/Xmobar/X11/Types.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Xmobar/X11/Types.hs b/src/Xmobar/X11/Types.hs
index 333dc96..b22f807 100644
--- a/src/Xmobar/X11/Types.hs
+++ b/src/Xmobar/X11/Types.hs
@@ -20,6 +20,7 @@ module Xmobar.X11.Types (X, XConf (..)) where
import Graphics.X11.Xlib
import Control.Monad.Reader
import Data.Map
+import qualified Data.List.NonEmpty as NE
import Xmobar.X11.Bitmap
import Xmobar.X11.Text
@@ -33,7 +34,7 @@ data XConf =
XConf { display :: Display
, rect :: Rectangle
, window :: Window
- , fontListS :: [XFont]
+ , fontListS :: NE.NonEmpty XFont
, verticalOffsets :: [Int]
, iconS :: Map FilePath Bitmap
, config :: Config