   "Mark the position of the lock zone by highlighting the zone."
     (if merlin-lock-zone-highlight-overlay
       (delete-overlay merlin-lock-zone-highlight-overlay))
-  (setq merlin-lock-zone-highlight-overlay (make-overlay (point-min) merlin-lock-point))
+  (setq merlin-lock-zone-highlight-overlay (make-overlay (point-min) merlin-dirty-point))
   (overlay-put merlin-lock-zone-highlight-overlay 'face 'merlin-locked-face))
 
 (defun merlin-sync-lock-zone-display ()

    (merlin-wait-for-answer)))

;; SPECIAL CASE OF COMMANDS
(defun merlin-rewind ()
  "Rewind the knowledge of merlin of the current buffer to zero."
  (interactive)
  (let ((ext (file-name-extension buffer-file-name)))
    (merlin-send-command (list 'reset (if (string-equal ext "mli") 'mli 'ml) buffer-file-name))
    (merlin-error-reset)
    (setq merlin-lock-point (point-min))))

(defun merlin-refresh ()
  "Refresh changed merlin cmis."
  (interactive)
  (merlin-send-command '(refresh quick))
  (merlin-after-save))

(defun merlin-refresh-full ()
  "Refresh all merlin cmis."
  (interactive)
  (merlin-send-command 'refresh))

(defun merlin-get-completion (ident)
  "Return the completion for ident IDENT."
  (merlin-send-command (list 'complete 'prefix ident 'at (merlin-unmake-point (point)))))

(defun merlin-parse-position (result)
  (list
   (merlin-make-point (lookup-default 'cursor result nil))
   (lookup-default 'marker result nil)))

(defun merlin-get-position ()
  "Get the current position of merlin."
  (car (merlin-parse-position (merlin-send-command '(seek position)))))

(defun merlin-seek-before (point)
  "Move merlin's point to the valid definition before POINT."
  (merlin-parse-position (merlin-send-command (list 'seek 'before (merlin-unmake-point point)))))

(defun merlin-seek-exact (point)
  "Move merlin's point to the definition containing POINT."
  (merlin-parse-position (merlin-send-command (list 'seek 'exact (merlin-unmake-point point)))))

(defun merlin-seek-end ()
  "Move merlin's point to the end of its own view of the buffer."
  (merlin-parse-position (merlin-send-command '(seek end))))

;;;;;;;;;;;;;;;;;;;;
;; FILE SWITCHING ;;

      (let ((inhibit-read-only t)
            (buffer-undo-list t))
        (erase-buffer)
        (mapcar
         (lambda (pos)
           (lexical-let*
               ((start (assoc 'start pos))
