Skip to content

Commit

Permalink
Merge pull request #4876 from melted/idemode_win
Browse files Browse the repository at this point in the history
Fix CRLF encoding of idemode commands on windows.
  • Loading branch information
melted committed Jun 30, 2020
2 parents f30c235 + 1b8e92f commit 6f968e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Idris/Output.hs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ iputStr :: String -> Idris ()
iputStr s = do i <- getIState
case idris_outputmode i of
RawOutput h -> runIO $ hPutStr h s
IdeMode n h -> runIO . hPutStr h $ convSExp "write-string" s n
IdeMode n h -> runIO . hPutStrLn h $ convSExp "write-string" s n

idemodePutSExp :: SExpable a => String -> a -> Idris ()
idemodePutSExp cmd info = do i <- getIState
Expand Down
1 change: 1 addition & 0 deletions src/Idris/REPL.hs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ idemodeStart :: Bool -> IState -> [FilePath] -> Idris ()
idemodeStart s orig mods
= do h <- runIO $ if s then initIdemodeSocket else return stdout
setIdeMode True h
runIO $ hSetNewlineMode h (NewlineMode { inputNL = CRLF, outputNL = LF })
i <- getIState
case idris_outputmode i of
IdeMode n h ->
Expand Down

0 comments on commit 6f968e5

Please sign in to comment.