summaryrefslogtreecommitdiff
path: root/Pancake.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Pancake.hs')
-rw-r--r--Pancake.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Pancake.hs b/Pancake.hs
index 5d49b1a..e854d13 100644
--- a/Pancake.hs
+++ b/Pancake.hs
@@ -317,6 +317,12 @@ command Quit = liftIO $ do
command Interrupt =
putErrLn "Received SIGINT. Interrupt twice in a row to quit."
command (SetWidth w) = modify $ \s -> s { columns = w }
+command Redisplay = do
+ st <- get
+ case history st of
+ ((uri, doc):_, _) -> printDoc uri doc
+ _ -> putErrLn "There's nothing to redisplay"
+
-- | Reads commands, runs them.
eventLoop :: MonadIO m => StateT LoopState m ()