diff options
author | defanor <defanor@uberspace.net> | 2017-11-09 00:35:04 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-11-09 00:35:04 +0300 |
commit | 074ac6af53c750039f6b32d6fb8ba0371fa4771d (patch) | |
tree | f604e0a18daf6c9815434b95156a189af88af2eb /Pancake.hs | |
parent | cb07ecb166d47be2ac7915f0e8605f970ba35532 (diff) |
pancake.el: prompt for input on RET
This is useful mostly for backward search.
Also ignore empty lines in embedded mode in pancake itself, and add a
"pancake>" prompt.
Diffstat (limited to 'Pancake.hs')
-rw-r--r-- | Pancake.hs | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 |