[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 770d0d8 59/66: Work around http://debbugs.gnu.org/19553
From: |
Dmitry Gutov |
Subject: |
[elpa] master 770d0d8 59/66: Work around http://debbugs.gnu.org/19553 |
Date: |
Tue, 13 Jan 2015 02:45:07 +0000 |
branch: master
commit 770d0d8956cd5f55bb61069a743225a28818c134
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Work around http://debbugs.gnu.org/19553
Fixes #274
---
company.el | 3 ++-
test/frontends-tests.el | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/company.el b/company.el
index b71b0f3..e4cfcdd 100644
--- a/company.el
+++ b/company.el
@@ -2220,7 +2220,8 @@ If SHOW-VERSION is non-nil, show the version in the echo
area."
(defun company-buffer-lines (beg end)
(goto-char beg)
(let (lines lines-moved)
- (while (and (> (setq lines-moved (vertical-motion 1)) 0)
+ (while (and (not (eobp)) ; http://debbugs.gnu.org/19553
+ (> (setq lines-moved (vertical-motion 1)) 0)
(<= (point) end))
(let ((bound (min end (1- (point)))))
;; A visual line can contain several physical lines (e.g. with
outline's
diff --git a/test/frontends-tests.el b/test/frontends-tests.el
index 1d12b3c..a10f914 100644
--- a/test/frontends-tests.el
+++ b/test/frontends-tests.el
@@ -267,6 +267,15 @@
(should (equal (company-buffer-lines (point-min) (point-max))
'("" "" "" "eee" "fff" "ggg")))))
+(ert-deftest company-buffer-lines-with-multiline-after-string-at-eob ()
+ :tags '(interactive)
+ (with-temp-buffer
+ (insert "a\nb\nc\n")
+ (let ((ov (make-overlay (point-max) (point-max) nil t t)))
+ (overlay-put ov 'after-string "~\n~\n~"))
+ (should (equal (company-buffer-lines (point-min) (point-max))
+ '("a" "b" "c")))))
+
(ert-deftest company-modify-line ()
(let ((str "-*-foobar"))
(should (equal-including-properties
- [elpa] master aa7c1ca 57/66: Simplify NEWS entry, (continued)
- [elpa] master aa7c1ca 57/66: Simplify NEWS entry, Dmitry Gutov, 2015/01/12
- [elpa] master eb1f0db 58/66: Fixup a test, Dmitry Gutov, 2015/01/12
- [elpa] master 9c99c7c 60/66: company-search-abort: Move predicate reset to the mode function, Dmitry Gutov, 2015/01/12
- [elpa] master 31d352f 53/66: Update NEWS.md, Dmitry Gutov, 2015/01/12
- [elpa] master 559b4f2 49/66: Don't repeat search with empty string, Dmitry Gutov, 2015/01/12
- [elpa] master 388545b 54/66: Add company-complete-common-or-cycle, Dmitry Gutov, 2015/01/12
- [elpa] master 160ab01 63/66: Split company--process-candidates into -pre and -post, Dmitry Gutov, 2015/01/12
- [elpa] master 8f09f52 61/66: Replace `cl-plusp' usages with `string=', Dmitry Gutov, 2015/01/12
- [elpa] master 5b0f1c8 62/66: company-search-delete-char: Use `ding', Dmitry Gutov, 2015/01/12
- [elpa] master 5ebcae8 64/66: Improve duplicates removal, Dmitry Gutov, 2015/01/12
- [elpa] master 770d0d8 59/66: Work around http://debbugs.gnu.org/19553,
Dmitry Gutov <=
- [elpa] master eb0d8d9 65/66: Release 0.8.8, Dmitry Gutov, 2015/01/12
- [elpa] master a95c2ce 42/66: Reorganize tests layout, Dmitry Gutov, 2015/01/12
- [elpa] master 092486e 66/66: Merge commit 'eb0d8d9e687e1364098f9abc6f9281fcbc0d3abd' from company, Dmitry Gutov, 2015/01/12