                  (>= current-visual-column menu-width))
             (setq menu-column (- menu-column menu-width))))
       ;; Make a room to show menu at the end of buffer
-      (forward-line 1)
-      (if (eq line (line-number-at-pos))
-          (newline)
-        (forward-line -1))
+      (when (eq (line-end-position) (point-max))
+        (end-of-line)
+        (newline))
       (setq ac-menu (ac-menu-create line menu-column menu-width height ac-menu-direction)))))
 
 (defun ac-cleanup ()

;; - dictionary
;; - documentation
;; - performance issue (cache issue)
;; - fix narrowing bug (reported by Yuto Hayamizu <y.hayamizu@gmail.com>)
;; - scroll bar (visual)
;; - show description
;; - semantic

  "Implemention for `ac-prefix-function' by sources."
  (let (point)
    (dolist (pair ac-omni-completion-sources)
      (when (looking-back (car pair) nil t)
        (setq ac-current-sources (cdr pair))
        (setq ac-sources-omni-completion t)
        (setq ac-completing t)
