Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gerdreiss committed Apr 30, 2021
1 parent 2833220 commit 27550a4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/Control/Brew/Maintenance.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module Control.Brew.Maintenance
( procFormulas
, procFormula
)
where
) where

import Control.Brew.Commands ( uninstallFormula )
import Data.Brew ( Answer(..)
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Brew.hs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ type ErrorOrFormulas = Either BrewError [BrewFormula]
type ErrorOrFormula = Either BrewError BrewFormula

--
-- | answes
-- | answers
--

data Answer
Expand Down
6 changes: 2 additions & 4 deletions src/Tui/Widgets.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ formulas s = do
let
fs =
formulaNames (s ^. stateFormulas) (s ^. stateFormulaNameOp) (getEditedFormulaName s)
withBorderStyle unicodeBold
in withBorderStyle unicodeBold
. border
. hLimit leftWidth
. vBox
Expand All @@ -80,9 +80,7 @@ formulas s = do

formulaNames
:: NonEmptyCursor BrewFormula -> FormulaOp -> String -> NonEmptyCursor BrewFormula
formulaNames fs FormulaJumpTo [] = fs
formulaNames fs FormulaJumpTo name = selectFormula fs name
formulaNames fs _ _ = fs
formulaNames fs op name = if op /= FormulaJumpTo || null name then fs else selectFormula fs name

selectFormula :: NonEmptyCursor BrewFormula -> String -> NonEmptyCursor BrewFormula
selectFormula fs name = fromMaybe fs (nonEmptyCursorSearch prefix fs)
Expand Down

0 comments on commit 27550a4

Please sign in to comment.