summaryrefslogtreecommitdiff
path: root/Pancake.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Pancake.hs')
-rw-r--r--Pancake.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Pancake.hs b/Pancake.hs
index ab27ed6..a2c37f8 100644
--- a/Pancake.hs
+++ b/Pancake.hs
@@ -190,12 +190,12 @@ command Forward = do
_ -> liftIO $ putErrLn "Nowhere to go"
command More = do
st <- get
- term <- liftIO setupTermFromEnv
- let lineCount' = fromMaybe 25 (getCapability term termLines)
- lineCount = lineCount' - div lineCount' 3
- showLines $ take lineCount $ drop (position st) (rLines $ rendered st)
- modify (\s -> s { position = position st + lineCount })
- pure ()
+ unless (embedded st) $ do
+ term <- liftIO setupTermFromEnv
+ let lineCount' = fromMaybe 25 (getCapability term termLines)
+ lineCount = lineCount' - div lineCount' 3
+ showLines $ take lineCount $ drop (position st) (rLines $ rendered st)
+ modify (\s -> s { position = position st + lineCount })
command Reload = do
st <- get
case history st of