   (remove-overlays nil nil 'face 'fsharp-error-face)
   (remove-overlays nil nil 'face 'fsharp-warning-face))
 
+(defun ac-fsharp-show-tip (s)
+  "Display a tooltip using pos-tip if selected, and minibuffer otherwise"
+  (if ac-fsharp-use-pos-tip
+      (pos-tip-show s nil nil nil -1 80)
+    (message s)))
+
 (defun ac-fsharp-stash-partial (str)
   (setq ac-fsharp-partial-data (concat ac-fsharp-partial-data str)))
 

(defun ac-fsharp-tooltip-at-point ()
  "Fetch and display F# tooltips at point"
  (interactive)
  (require 'pos-tip)
  (when (ac-fsharp-can-make-request)
    (ac-fsharp-parse-current-buffer)
    (ac-fsharp-send-pos-request "tooltip"

         ((string/starts-with msg "DATA: tooltip")
          (let ((data (replace-regexp-in-string "DATA: tooltip\n" ""
                                                msg)))
            (ac-fsharp-show-tip data)))

         ((string/starts-with msg "DATA: errors")
          (ac-fsharp-show-errors
