X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/eb1f0dbae6edbf10d461a394966a2ec485409ebb..770d0d8956cd5f55bb61069a743225a28818c134:/company.el diff --git a/company.el b/company.el index b71b0f3e5..e4cfcdde3 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