         # console.log "old range: #{@marker.bufferMarker.range.start} #{@marker.bufferMarker.range.end}"
         # console.log "new range: #{range.start} #{range.end}"
 
-        # input content
-        content = @agda.editor.getBuffer().getTextInRange(range).substr(1)
+        # update input content incrementally,
+        # append only with the last character,
+        # since the former characters may could have been replaced with a preview symbol
+        @input += @agda.editor.getBuffer().getTextInRange(range).substr(1).substr(-1)
 
         # see if the input is in the keymap
-        {valid, result} = @validate content
+        {valid, result} = @validate()
 
+        
         if valid
           if Object.keys(result).length is 1
             # no further possible key combinations

      @decorator.hide()
      @marker.destroy()
      @activated = false

  # if the string is in the keymap
  validate: (string) ->
    valid = true
    cursor = InputMethod.trie
    for i in [0 .. string.length - 1]
      char = string.charAt i
      next = cursor[char]
      if next
        cursor = next


          else
            # further key combinations are possible
            if result['>>'].length > 0
              symbol = result['>>'][0]
              @agda.editor.getBuffer().setTextInRange range, symbol
              @decorator.resize(new Range range.start, range.start.translate(new Point 0, 1))
            else
              @decorator.resize range

        else
          # key combination out of keymap
