anchor.diff:          let editorData = x.Editor.GetContent<ITextEditorDataProvider>().GetTextEditorData()
           editorData.Caret.Mode <- CaretMode.Block
   
  -    override x.KeyPress(descriptor:KeyDescriptor) =
  +    override x.KeyPress descriptor =
           let editorData = x.Editor.GetContent<ITextEditorDataProvider>().GetTextEditorData()
  -        let state, handledKeyPress = handleKeyPress vimState descriptor editorData
  -        vimState <- state
  -        match handledKeyPress with
  -        | true -> false
  -        | false -> base.KeyPress descriptor
  +        let oldState = vimState
  +
  +        let newState, handledKeyPress = handleKeyPress vimState descriptor editorData
  +        LoggingService.LogDebug (sprintf "%A %A" newState handledKeyPress)
  +        vimState <- newState
  +        match oldState.mode with
  +        | InsertMode -> base.KeyPress descriptor
  +        | _ -> false
  
positive.code:             | _ -> []
          multiplier, action
  
      let handleKeyPress (state:VimState) (keyPress:KeyDescriptor) (editorData:TextEditorData) =
          let newKeys =
              match keyPress.KeyChar with
              | 'q' -> []
              | c when keyPress.KeyChar <> '\000' -> state.keys @ [c |> string]
              | c when keyPress.KeyChar = '\000' ->
                  match keyPress.SpecialKey with
                  | SpecialKey.Escape -> state.keys @ ["<esc>"]
                  | _ -> state.keys
              | _ -> state.keys
          let newState = { state with keys=newKeys }
          let multiplier, action = parseKeys newState
          match multiplier, action with
          | _, actions ->
              let rec performActions actions' state handled =
                  match actions' with
                  | [] -> state, handled
                  | h::t ->
                      LoggingService.LogDebug (sprintf "%A %A" newKeys h)
                      if h.commandType <> DoNothing then
                          let newState = runCommand state editorData h
                          performActions t { newState with keys = [] } true
  
negative.code:             | _ -> None, keyList
  
          let run = getCommand multiplier
          LoggingService.LogDebug (sprintf "%A %A" state.mode keyList)
          let action =
              match state.mode, keyList with
              | InsertMode, [ "<esc>" ] -> [ run (SwitchMode NormalMode) Nothing ]
  