Continue mouse context refactor
This commit is contained in:
+7
-5
@@ -389,8 +389,9 @@ shiftInvItemsDown (_, i) x w = fromMaybe w $ do
|
||||
g i' m = fst <$> IM.lookupGT i' m
|
||||
|
||||
updateMouseContext :: Configuration -> Universe -> Universe
|
||||
updateMouseContext cfig u =
|
||||
u & uvWorld . input . mouseContext
|
||||
updateMouseContext cfig u = case u ^. uvWorld . input . mouseContext of
|
||||
OverInvDrag -> u
|
||||
_ -> u & uvWorld . input . mouseContext
|
||||
.~ fromMaybe
|
||||
aimcontext
|
||||
(overmenu <|> overinv <|> overcomb <|> overterm)
|
||||
@@ -440,9 +441,10 @@ updateMouseContext cfig u =
|
||||
return $
|
||||
if isOverTerminalScreen cfig tm mpos
|
||||
then
|
||||
if null $ tm ^. tmInput . tiText
|
||||
then NoMouseContext
|
||||
else OverTerminalReturn
|
||||
fromMaybe NoMouseContext $ do
|
||||
let s = tm ^. tmInput . tiText
|
||||
guard $ not (null s) && _tmStatus tm == TerminalReady
|
||||
return $ OverTerminalReturn tmid
|
||||
else OverTerminalEscape
|
||||
|
||||
isOverTerminalScreen :: Configuration -> Terminal -> Point2 -> Bool
|
||||
|
||||
Reference in New Issue
Block a user