     (remove-hook 'post-command-hook 'floobits-post-command-func))
 
   (remove-hook 'after-save-hook 'floobits-after-save-hook)
+  (remove-hook 'minibuffer-exit-hook 'floobits-minibuffer-exit-hook)
   (ad-disable-advice 'delete-file 'before 'floobits-delete-file)
   (ad-disable-advice 'rename-file 'before 'floobits-rename-file))
 

      (add-hook 'buffer-list-update-hook 'floobits-buffer-list-change nil nil))
    (add-hook 'post-command-hook 'floobits-post-command-func nil nil))
  (add-hook 'after-save-hook 'floobits-after-save-hook nil nil)
  ; (add-hook 'buffer-list-update-hook 'floobits-buffer-list-change nil nil)
  (ad-enable-advice 'delete-file 'before 'floobits-delete-file)
  (ad-enable-advice 'rename-file 'before 'floobits-rename-file)

            (cons 'deleted deleted))))
        (floobits-send-to-agent req 'buffer_list_change)))))

  ; (run-at-time 2 nil (lambda () (floobits-event-user_input '(("id" . 1) ("name" . "user_input") ("prompt" . ": ") ("initial" . "overwrite-") ("choices" . [["overwrite-remote" 0] ["overwrite-local" 1] ["cancel" 2]])))))
(defun floobits-minibuffer-exit-hook ()
  (when floobits-user-input-events
    (run-at-time 0 nil
      (lambda ()
        (while floobits-user-input-events
          (let ((req (car floobits-user-input-events)))
            (setq floobits-user-input-events (cdr floobits-user-input-events))
            (floobits-event-user_input req)))))))


(defun floobits-get-line-endings ()
  (symbol-name buffer-file-coding-system))

