Fix left clicks in terminals

This commit is contained in:
2023-05-03 16:45:39 +01:00
parent 1d5f982fcc
commit 727e5af2a6
7 changed files with 33 additions and 24 deletions
+7 -3
View File
@@ -256,9 +256,13 @@ commandFutureLines s tm w = fromMaybe [errline "^ Invalid command"] $ do
case doTerminalCommandEffect (_tcEffect command) tm w of
NoArguments tls -> Just tls
OneArgument argtype m ->
let setpartial =
TerminalLineTerminalEffect 0 (TmTmSetPartialCommand (Just str)) :
makeTermPara ("expects " ++ argtype ++ " as an argument")
let setpartial
| null (_tmPartialCommand tm)
= TerminalLineTerminalEffect 0 (TmTmSetPartialCommand (Just command)) :
makeTermPara ("Expects " ++ argtype ++ " as an argument")
| otherwise =
TerminalLineTerminalEffect 0 (TmTmSetPartialCommand Nothing) :
makeTermPara ("No argument input, cancelling")
in Just $
fromMaybe setpartial $
safeHead args >>= (m M.!?)