company-mode/company-mode — pull request #57 by sadboy (2014-02-05 00:05:05+00:00)
Title: company-pseudo-tooltip-frontend: Use one overlay per tooltip line to imp...

Currently, `company-pseudo-tooltip-frontend` uses one big overlay to cover the entire range of lines spanned by the tooltip. This disrupts the display of the region if other modes are also using overlays to convey visual information, such as linum, semantic-decoration, etc, creating an annoying visual distraction, especially when typing very quickly.

This patch reimplements company-pseudo-tooltip-frontend using additional overlays (one-per-tooltip-line) to more accurately cover the rectangular region occupied by the tooltip.

Known issues:
- Should probably limit maximum tooltip width, to prevent overly long candidate items from messing up display.

* company.el:

(company-tooltip): Explicitly specify ':weight', ':underline', ':overline',
':strike-through' properties to prevent properties of covered buffer text from
"leaking" through.

(company-end-of-buffer-workaround, company-added-newline): Removed. We now
always pad newlines when needed.

(company-pseudo-tooltip-overlay, company-tooltip-offset): Moved declaration up
in the file so we don't need to double-defvar.

(company-plainify, company-buffer-lines, company-modify-line,
company--length-limit, company--replacement-string, company--offset-line):
Removed.

(company--window-width): Moved definition up before `company--create-lines' to
avoid byte-compiler warning.

(company--create-line-overlay, company-pseudo-tooltip-hide-line,
company-pseudo-tooltip-unhide-line): New functions.

(company-pseudo-tooltip-show, company-pseudo-tooltip-hide,
company-pseudo-tooltip-hide-temporarily, company-pseudo-tooltip-unhide):
Modified.

* company-test.el

(company-pseudo-tooltip-show, company-pseudo-tooltip-show-with-annotations):
Updated.

(company-column-with-composition, company-column-with-line-prefix,
company-column-wth-line-prefix-on-empty-line, company-plainify,
company-modify-line): Removed.