anchor.diff:    "Delete character before cursor."
     (with-accessors ((buffer input-buffer) (cursor input-cursor-position)) minibuffer
       (unless (= cursor 0)
  -      (setf buffer
  -            (concatenate 'string
  -                         (subseq buffer 0 (- cursor 1))
  -                         (subseq buffer cursor (length buffer))))
  -      (decf cursor)))
  +      (let ((old-cursor cursor))
  +        ;; Change cursor before buffer or else we could have a cursor that's
  +        ;; beyond the buffer length.
  +        (decf cursor)
  +        (setf buffer
  +              (concatenate 'string
  +                           (subseq buffer 0 (- old-cursor 1))
  +                           (subseq buffer old-cursor (length buffer)))))))
     (state-changed minibuffer)
     (update-display minibuffer))
   
  
positive.code:   "Delete characters from cursor position until the beginning of the word at point."
    (with-accessors ((buffer input-buffer) (cursor input-cursor-position)) minibuffer
      (multiple-value-bind (new-string new-position) (%delete-backwards-word buffer cursor)
        (setf buffer new-string
              cursor new-position)))
    (state-changed minibuffer)
    (update-display minibuffer))
  
  
negative.code:   (with-accessors ((buffer input-buffer) (cursor input-cursor-position)) minibuffer
      (let* ((current-cursor-position cursor)
             (new-cursor-position (cursor-forwards-word minibuffer))
             (transpose-distance (- new-cursor-position current-cursor-position))
             (new-buffer (concatenate 'string
                           (subseq buffer 0 current-cursor-position)
                           (subseq buffer new-cursor-position (length buffer)))))
        (setf cursor (- cursor transpose-distance))
        (setf buffer new-buffer)))
    (state-changed minibuffer)
    (update-display minibuffer))
  
  