(while (and (not (eobp)) ; http://debbugs.gnu.org/19553
(> (setq lines-moved (vertical-motion 1)) 0)
(<= (point) end))
- (let ((bound (min end (1- (point)))))
+ (let ((bound (min end (point))))
;; A visual line can contain several physical lines (e.g. with outline's
;; folding overlay). Take only the first one.
(push (buffer-substring beg
(insert (propertize "a" 'display "bbb\nccc\ndddd\n"))
(insert "eee\nfff\nggg")
(should (equal (company-buffer-lines (point-min) (point-max))
- '("" "" "" "eee" "fff" "ggg")))))
+ '("a" "" "" "eee" "fff" "ggg")))))
(ert-deftest company-buffer-lines-with-multiline-after-string-at-eob ()
:tags '(interactive)
(should (equal (company-buffer-lines (point-min) (point-max))
'("a" "b" "c")))))
+(ert-deftest company-buffer-lines-with-line-wrapping ()
+ :tags '(interactive)
+ (with-temp-buffer
+ (let ((ww (company--window-width)))
+ (insert (make-string (* 3 ww) ?a))
+ (should (equal (company-buffer-lines (point-min) (point-max))
+ (list (make-string ww ?a)
+ (make-string ww ?a)
+ (make-string ww ?a)))))))
+
(ert-deftest company-modify-line ()
(let ((str "-*-foobar"))
(should (equal-including-properties