From 568923344f0941b2771459dd8dbe935ac971a968 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 28 Dec 2024 14:53:58 +0530 Subject: Allow clicking with enter --- src/Chelleport/AppState.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Chelleport/AppState.hs') diff --git a/src/Chelleport/AppState.hs b/src/Chelleport/AppState.hs index 4c8e0a8..fe397e8 100644 --- a/src/Chelleport/AppState.hs +++ b/src/Chelleport/AppState.hs @@ -9,6 +9,7 @@ import Chelleport.Types import Chelleport.Utils (cIntToInt, clamp, intToCInt, isEmpty, itemAt) import Control.Monad (replicateM_) import Data.Char (toLower) +import Data.Default (Default (def)) import Data.Maybe (isJust) import qualified Text.Fuzzy as Fuzzy @@ -16,7 +17,7 @@ initialState :: (Monad m) => Configuration -> m (State, Maybe AppAction) initialState config = do let cells = either error id $ generateGrid 0 (rows, columns) hintKeys let action = Just $ SetMode $ configMode config - pure (defaultAppState {stateGrid = cells}, action) + pure (def {stateGrid = cells}, action) where rows = 9 columns = 16 -- cgit v1.3.1