Permalink
Browse files

Fixed bug in newline handling, vih.h

  • Loading branch information...
1 parent e5837eb commit ff97967f2d60ad2d592d7c29de9c6b4bd8b0b6b7 @michaelfeathers committed Aug 14, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 vih.hs
View
6 vih.hs
@@ -22,9 +22,9 @@ mainLoop mode buffer@(EditBuffer location contents) =
then
case ch of
'\ESC' -> mainLoop Command (enterCommandMode buffer)
- _ -> if not (isControl ch)
- then mainLoop mode (insertChar ch buffer)
- else mainLoop mode buffer
+ _ -> if (isControl ch) && not (ch == '\n')
+ then mainLoop mode buffer
+ else mainLoop mode (insertChar ch buffer)
else
case ch of
':' -> handleCommandLine buffer

0 comments on commit ff97967

Please sign in to comment.