]> code.delx.au - gnu-emacs-elpa/commitdiff
Prevented last character in buffer from disappearing.
authorNikolaj Schumacher <git@nschum.de>
Sun, 15 Mar 2009 22:26:07 +0000 (23:26 +0100)
committerNikolaj Schumacher <git@nschum.de>
Fri, 20 Mar 2009 09:20:42 +0000 (10:20 +0100)
company.el

index e3867b84fb3175239e9147c94703c4083cd4a68b..627574b662023a23161a38b5593453626d8de5ef 100644 (file)
   (goto-char beg)
   (let ((row (cdr (posn-col-row (posn-at-point))))
         lines)
-    (while (< (point) end)
-      (move-to-window-line (incf row))
+    (while (and (equal (move-to-window-line (incf row)) row)
+                (<= (point) end))
       (push (buffer-substring beg (min end (1- (point)))) lines)
       (setq beg (point)))
+    (unless (eq beg end)
+      (push (buffer-substring beg end) lines))
     (nreverse lines)))
 
 (defun company-modify-line (old new offset)