mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-29 16:56:59 +00:00
terminal: allow trailing spaces in terminal commands (e.g., to drag and drop files) (#1467)
This commit is contained in:
committed by
GitHub
parent
ef1133ee98
commit
eb81b62892
+2
-1
@@ -27,6 +27,7 @@ import Data.Bifunctor (bimap, first)
|
||||
import qualified Data.ByteString.Base64 as B64
|
||||
import Data.ByteString.Char8 (ByteString)
|
||||
import qualified Data.ByteString.Char8 as B
|
||||
import Data.Char (isSpace)
|
||||
import Data.Either (fromRight)
|
||||
import Data.Fixed (div')
|
||||
import Data.Functor (($>))
|
||||
@@ -227,7 +228,7 @@ execChatCommand s = case parseChatCommand s of
|
||||
Right cmd -> either CRChatCmdError id <$> runExceptT (processChatCommand cmd)
|
||||
|
||||
parseChatCommand :: ByteString -> Either String ChatCommand
|
||||
parseChatCommand = A.parseOnly chatCommandP
|
||||
parseChatCommand = A.parseOnly chatCommandP . B.dropWhileEnd isSpace
|
||||
|
||||
toView :: ChatMonad m => ChatResponse -> m ()
|
||||
toView event = do
|
||||
|
||||
Reference in New Issue
Block a user