"When non-nil, align annotations to the right tooltip border."
:type 'boolean)
+(defcustom company-tooltip-flip-when-above nil
+ "Whether to flip the tooltip when it's above the current line."
+ :type 'boolean)
+
(defvar company-safe-backends
'((company-abbrev . "Abbrev")
(company-bbdb . "BBDB")
(defun company--replacement-string (lines old column nl &optional align-top)
(cl-decf column company-tooltip-margin)
+ (when (and align-top company-tooltip-flip-when-abovex)
+ (setq lines (reverse lines)))
+
(let ((width (length (car lines)))
(remaining-cols (- (+ (company--window-width) (window-hscroll))
column)))