Try to autocomplete before doing terminal return

This commit is contained in:
2025-08-20 17:53:39 +01:00
parent 3936e1a386
commit 21460ceaa8
3 changed files with 63 additions and 58 deletions
+1 -3
View File
@@ -405,9 +405,7 @@ updateKeysTextInputTerminal tmid u =
uvWorld %~ terminalReturnEffect tmid
| otherwise = id
tryTabComplete
| u ^. uvWorld . input . pressedKeys . at ScancodeTab == Just 0 = fromMaybe id $ do
s <- u ^? uvWorld . cWorld . lWorld . terminals . ix tmid . tmStatus . tiText
return $ uvWorld . cWorld . lWorld . terminals . ix tmid %~ tabComplete s (u ^. uvWorld)
| u ^. uvWorld . input . pressedKeys . at ScancodeTab == Just 0 = uvWorld . cWorld . lWorld . terminals . ix tmid %~ tabComplete (u ^. uvWorld)
| otherwise = id
updateKeyInGame :: Universe -> Scancode -> Int -> Universe