mirror of
https://github.com/ilyakooo0/vty.git
synced 2024-11-29 08:49:40 +03:00
Graphics.Vty.UnicodeWidthTable.Query: document mkRanges
This commit is contained in:
parent
d0645568ef
commit
5ed59bb70d
@ -26,6 +26,10 @@ charWidth c = do
|
||||
Just (_, col) <- getCursorPosition
|
||||
return col
|
||||
|
||||
-- | Convert a sequence of character/width pairs into a list of
|
||||
-- run-length encoded ranges. This function assumes the pairs come
|
||||
-- sorted by character ordinal value. It does not require that the
|
||||
-- character range is fully covered by the sequence.
|
||||
mkRanges :: [(Char, Int)] -> [WidthTableRange]
|
||||
mkRanges pairs =
|
||||
let convertedPairs = convert <$> pairs
|
||||
|
Loading…
Reference in New Issue
Block a user