[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] [elpa] 04/12: {cutoff, offset}, {numbered, position}-line
From: |
Dmitry Gutov |
Subject: |
[ELPA-diffs] [elpa] 04/12: {cutoff, offset}, {numbered, position}-line |
Date: |
Sat, 25 Jan 2014 11:35:48 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit 7578184a7c8628633fa825d3e8c2faa295102ead
Author: Dmitry Gutov <address@hidden>
Date: Fri Jan 24 02:30:00 2014 +0200
{cutoff,offset}, {numbered,position}-line
---
company.el | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/company.el b/company.el
index 4dd7b74..27343fa 100644
--- a/company.el
+++ b/company.el
@@ -1769,9 +1769,9 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\"
\"foobarbaz\"\)\)"
(when (> width remaining-cols)
(decf column (- width remaining-cols))))
- (let ((cutoff (and (< column 0) (- column)))
+ (let ((offset (and (< column 0) (- column)))
new)
- (when cutoff
+ (when offset
(setq column 0))
(when align-top
;; untouched lines first
@@ -1780,12 +1780,12 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\"
\"foobarbaz\"\)\)"
;; length into old lines.
(while old
(push (company-modify-line (pop old)
- (company--cutoff-line (pop lines) cutoff)
+ (company--offset-line (pop lines) offset)
column) new))
;; Append whole new lines.
(while lines
(push (concat (company-space-string column)
- (company--cutoff-line (pop lines) cutoff))
+ (company--offset-line (pop lines) offset))
new))
(let ((str (concat (when nl "\n")
@@ -1794,9 +1794,9 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\"
\"foobarbaz\"\)\)"
(font-lock-append-text-property 0 (length str) 'face 'default str)
str)))
-(defun company--cutoff-line (line cutoff)
- (if (and cutoff line)
- (substring line cutoff)
+(defun company--offset-line (line offset)
+ (if (and offset line)
+ (substring line offset)
line))
(defun company--create-lines (selection limit)
@@ -1842,7 +1842,7 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\"
\"foobarbaz\"\)\)"
(setq numbered company-tooltip-offset))
(when previous
- (push (company--numbered-line previous width) new))
+ (push (company--position-line previous width) new))
(dotimes (i len)
(push (company-fill-propertize
@@ -1857,11 +1857,11 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\"
\"foobarbaz\"\)\)"
new))
(when remainder
- (push (company--numbered-line remainder width) new))
+ (push (company--position-line remainder width) new))
(setq lines (nreverse new))))
-(defun company--numbered-line (text width)
+(defun company--position-line (text width)
(propertize (concat (company-space-string company-tooltip-margin)
(company-safe-substring text 0 width)
(company-space-string company-tooltip-margin))
- [ELPA-diffs] [elpa] branch master updated (324e000 -> c87035c), Dmitry Gutov, 2014/01/25
- [ELPA-diffs] [elpa] 06/12: company-select-mouse: update for when scrollbar is used, Dmitry Gutov, 2014/01/25
- [ELPA-diffs] [elpa] 03/12: company--numbered-line: span tooltip face to the margins, Dmitry Gutov, 2014/01/25
- [ELPA-diffs] [elpa] 01/12: Fix #49, Dmitry Gutov, 2014/01/25
- [ELPA-diffs] [elpa] 08/12: company--create-lines: Clear the old offset when appropriate, Dmitry Gutov, 2014/01/25
- [ELPA-diffs] [elpa] 07/12: company--create-lines: only reserve width for numbers when they'll be displayed, Dmitry Gutov, 2014/01/25
- [ELPA-diffs] [elpa] 04/12: {cutoff, offset}, {numbered, position}-line,
Dmitry Gutov <=
- [ELPA-diffs] [elpa] 09/12: * company-capf.el (company--capf-data): Don't get confused by lambda exps., Dmitry Gutov, 2014/01/25
- [ELPA-diffs] [elpa] 10/12: Release 0.6.14, Dmitry Gutov, 2014/01/25
- [ELPA-diffs] [elpa] 11/12: Remove leftover message statement, Dmitry Gutov, 2014/01/25
- [ELPA-diffs] [elpa] 02/12: Render the popup with margins, Dmitry Gutov, 2014/01/25
- [ELPA-diffs] [elpa] 05/12: Render scrollbar on the side of the tooltip, Dmitry Gutov, 2014/01/25
- [ELPA-diffs] [elpa] 12/12: Merge commit '8dc8f9525714db66f659a2a51322345068764bd3' from company, Dmitry Gutov, 2014/01/25