mirror of
https://github.com/CrystalSplitter/ghcitui.git
synced 2024-08-17 07:00:44 +03:00
Update minor docs in Events.hs
This commit is contained in:
parent
46ca959f51
commit
dcf48c2639
@ -245,7 +245,9 @@ appendToLogs logs promptEntry state = state{interpLogs = take interpreterLogLimi
|
||||
-- TODO: Should be configurable?
|
||||
interpreterLogLimit = 1000
|
||||
|
||||
-- | Reflow entries of text into columns.
|
||||
{- | Reflow entries of text into columns.
|
||||
Mostly useful right now for printing autocomplete suggestions into columns.
|
||||
-}
|
||||
reflowText
|
||||
:: Int
|
||||
-- ^ Num columns
|
||||
@ -265,6 +267,7 @@ reflowText numCols colWidth = go
|
||||
maxTextLen = colWidth - 1
|
||||
makeLine xs = T.concat (T.justifyLeft colWidth ' ' . shortenText maxTextLen <$> xs)
|
||||
|
||||
-- | Limit text to a given length, and cut with an elipses.
|
||||
shortenText :: Int -> T.Text -> T.Text
|
||||
shortenText maxLen text
|
||||
| len <= maxLen = text
|
||||
|
Loading…
Reference in New Issue
Block a user