diff options
-rw-r--r-- | Main.hs | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -192,8 +192,14 @@ insertChar c (ls, rs) = (ls ++ [c], rs) execCommand :: Command -> ExecM () -execCommand (MotionCommand x) = +execCommand (MotionCommand x) = do modifyBuffer (move x) + -- TODO apply mode constraints somewhere else + q <- get + when (mode q == NormalMode) $ + when (null $ snd $ buffer q) $ + modifyBuffer (gotoLeft 1) + execCommand (InsertChar c) = modifyBuffer (insertChar c) |