@@ -30,13 +30,13 @@ data TextInputConfig t = TextInputConfig
3030 { _textInputConfig_initialValue :: TextZipper
3131 , _textInputConfig_modify :: Event t (TextZipper -> TextZipper)
3232 , _textInputConfig_tabWidth :: Int
33− , _textInputConfig_display :: Char -> Char
33+ , _textInputConfig_display :: Dynamic t (Char -> Char)
3434 -- ^ Transform the characters in a text input before displaying them. This is useful, e.g., for
3535 -- masking characters when entering passwords.
3636 }
3737
3838instance Reflex t => Default (TextInputConfig t) where
39− def = TextInputConfig empty never 4 id
39+ def = TextInputConfig empty never 4 (pure id)
4040
4141-- | The output produced by text input widgets, including the text
4242-- value and the number of display lines (post-wrapping). Note that some
@@ -67,7 +67,7 @@ textInput cfg = do
6767 let cursorAttrs = ffor f $ \x -> if x then cursorAttributes else V.defAttr
6868 let rows = (\w s c -> displayLines w V.defAttr c s)
6969 <$> dw
70− <*> (mapZipper (_textInputConfig_display cfg) <$> v)
70+ <*> (mapZipper <$> _textInputConfig_display cfg <*> v)
7171 <*> cursorAttrs
7272 img = images . _displayLines_spans <$> rows
7373 y <- holdUniqDyn $ _displayLines_cursorY <$> rows