Fix eclipse behaviour when printing times
parent
49ffea3f2e
commit
fb24ad389c
|
@ -449,10 +449,13 @@ ellipseFloat conf start floatright =
|
|||
in case c_termSize conf of
|
||||
Nothing -> start <> floatright
|
||||
Just (_, w) ->
|
||||
let remaining = w - 2 - startLength - floatLength
|
||||
in if remaining >= 0
|
||||
then start <> Text.replicate remaining (t " ") <> floatright
|
||||
else Text.take (remaining - 1) start <> t "…" <> floatright
|
||||
let space = w - floatLength - 2
|
||||
in if space >= startLength
|
||||
then
|
||||
start
|
||||
<> Text.replicate (space - startLength) (t " ")
|
||||
<> floatright
|
||||
else Text.take (space - 1) start <> t "…" <> floatright
|
||||
ellipse :: Config -> Text -> Text
|
||||
ellipse conf x = ellipseFloat conf x (Text.empty)
|
||||
|
||||
|
|
Loading…
Reference in New Issue