Cleanup, fix damage code terminal bug

This commit is contained in:
2025-08-20 15:59:22 +01:00
parent 9daa27ee8b
commit 4bf9ce59d5
12 changed files with 153 additions and 177 deletions
+1 -1
View File
@@ -407,7 +407,7 @@ updateKeysTextInputTerminal tmid u =
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
return $ uvWorld . cWorld . lWorld . terminals . ix tmid %~ tabComplete s (u ^. uvWorld)
| otherwise = id
updateKeyInGame :: Universe -> Scancode -> Int -> Universe
+2 -2
View File
@@ -138,13 +138,13 @@ terminalWheelEvent yi tmid w
wrapup s coms = PTE.findSuccessor s coms <|> PTE.findMin coms
wrapdown s coms = PTE.findPredecessor s coms <|> PTE.findMax coms
f tm = fromMaybe tm $ do
let coms = getCommands tm
let coms = getCommands w tm
x <- tm ^? tmStatus . tiText
let s = fromMaybe "" $ x ^? to words . ix 0
(s',_) <- dowrap s coms
return $ tm & tmStatus . tiText .~ s'
g tm = fromMaybe tm $ do
let coms = getCommands tm
let coms = getCommands w tm
x <- tm ^? tmStatus . tiText
let s = fromMaybe "" $ x ^? to words . ix 0
y = fromMaybe "" $ x ^? to words . ix 1