                   (ediff-cleanup-mess)
                   (set-buffer result)
                   (erase-buffer)
-                  (insert-buffer buffer-C)
+                  (insert-buffer-substring buffer-C)
                   (kill-buffer buffer-A)
                   (kill-buffer buffer-B)
                   (kill-buffer buffer-C)

            (error "No conflict markers found")))
      (set-buffer other-buffer)
      (erase-buffer)
      (insert-buffer result-buffer)
      (goto-char (point-min))
      (while (re-search-forward "^<<<<<<< .mine\n" nil t)
        (let ((start (match-beginning 0)))

    (save-excursion
      (set-buffer your-buffer)
      (erase-buffer)
      (insert-buffer-substring result-buffer)
      (goto-char (point-min))
      (while (re-search-forward "^<<<<<<< .mine\n" nil t)
        (setq found t)
