Skip to content

Commit

Permalink
Allow multiple lines in minibuffer.
Browse files Browse the repository at this point in the history
I picked 17 lines allowed because that's what my emacs seems to take
until it starts to open a separate buffer. Perhaps a better heuristic
should be employed but this should be fine unless someone complains. We
could make it customisable.

Closes yi-editor#477, fixes yi-editor#478, mention in yi-editor#485.
  • Loading branch information
Fuuzetsu committed Jun 7, 2014
1 parent a2a6a1f commit dbd8a24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion yi/src/library/Yi/Command.hs
Expand Up @@ -50,7 +50,7 @@ shellCommandV :: String -> YiM ()
shellCommandV cmd = do
(exitCode,cmdOut,cmdErr) <- liftBase $ runShellCommand cmd
case exitCode of
ExitSuccess -> if length (filter (== '\n') cmdOut) > 1
ExitSuccess -> if length (filter (== '\n') cmdOut) > 17
then withEditor . void $ -- see GitHub issue #477
newBufferE (Left "Shell Command Output")
(R.fromString cmdOut)
Expand Down
8 changes: 7 additions & 1 deletion yi/src/library/Yi/UI/Pango.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE CPP, ExistentialQuantification, TupleSections, NamedFieldPuns
, ViewPatterns, ScopedTypeVariables #-}
, ViewPatterns, ScopedTypeVariables, LambdaCase #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}

-- |
Expand Down Expand Up @@ -193,6 +193,12 @@ startNoMsg cfg ch outCh ed = do
panedAdd2 paned (baseWidget tabs)

status <- statusbarNew

-- Allow multiple lines in statusbar, GitHub issue #478
statusbarGetMessageArea status >>= containerGetChildren >>= \case
[w] -> labelSetSingleLineMode (castToLabel w) False
_ -> return ()

-- statusbarGetContextId status "global"

set vb [ containerChild := paned
Expand Down

0 comments on commit dbd8a24

Please sign in to comment.