diff --git a/src/App/Gui.hs b/src/App/Gui.hs index 56468df..9093603 100644 --- a/src/App/Gui.hs +++ b/src/App/Gui.hs @@ -60,6 +60,9 @@ runEditor f = do -> ByteString.Lazy for lazy, fast - Text.IO.hGetContents: strict, needs 2x file size while reading in -> filesize == 2xRAM = bad + - Pass the handler around instead of filename, close at exit + -> works with all above options (incl. the lazy variants, i think) + -> locks the file MultiReader/SingleWriter for free (i think) -} content `seq` hClose handle BrickMain.defaultMain theApp (initialState f content)