Partial rethink of terminal text input
This commit is contained in:
@@ -124,9 +124,9 @@ moveCombineSel yi =
|
||||
terminalWheelEvent :: Int -> Int -> World -> World
|
||||
terminalWheelEvent yi tmid w
|
||||
| w & has (input . mouseButtons . ix ButtonRight)
|
||||
, Just TerminalReady <- w ^? cWorld . lWorld . terminals . ix tmid . tmStatus =
|
||||
, Just TerminalTextInput{} <- w ^? cWorld . lWorld . terminals . ix tmid . tmStatus =
|
||||
w & cWorld . lWorld . terminals . ix tmid %~ updatetermsubsel
|
||||
| Just TerminalReady <- w ^? cWorld . lWorld . terminals . ix tmid . tmStatus =
|
||||
| Just TerminalTextInput{} <- w ^? cWorld . lWorld . terminals . ix tmid . tmStatus =
|
||||
w & cWorld . lWorld . terminals . ix tmid %~ updatetermsel
|
||||
| otherwise = w
|
||||
where
|
||||
@@ -143,7 +143,7 @@ terminalWheelEvent yi tmid w
|
||||
setInput i j tm =
|
||||
tm
|
||||
& tmInput . tiSel .~ (i, j)
|
||||
& tmInput . tiText .~ comstr ++ arg
|
||||
& tmStatus . tiText .~ comstr ++ arg
|
||||
where
|
||||
comstr = scrollCommandStrings w tm !! i
|
||||
tc = scrollCommands tm !! i
|
||||
|
||||
Reference in New Issue
Block a user