auto-complete / popup-el

Visual Popup Interface Library for Emacs
GNU General Public License v3.0
449 stars 96 forks source link

With Jedi: Docstrings won't overlap other code #75

Closed tarjeiba closed 9 years ago

tarjeiba commented 10 years ago

(Previously posted as Jedi-issue #174.)

Docstrings in auto-complete list all of a sudden shows some weird behavior in my emacs setup, as shown in the picture below.

To ensure that the docstrings will show when the dot is close to the right margin, I have the following in my .emacs file:

(setq jedi:complete-on-dot)
(add-hook 'python-mode-hook 'jedi:setup)
; preventing unwanted behavior of the doc strings
(defun my/jedi-mode-hook ()
  (setq-local ac-max-width 0.5))
(add-hook 'jedi-mode-hook 'my/jedi-mode-hook)

All help would be greatly appreciated.

syohex commented 10 years ago

Would you show us sample python code(we hope the code is small as possible) for reprodusing this issue ?

tarjeiba commented 10 years ago

Weirdly, I can't myself reproduce the exact same behavior as shown above. But even something as simple as

import numpy as np
s1 = "This is a short string."
a = np.re|
s2 = "This is a somewhat longer string."

will give me trouble if the dot is at | and I attempt to display docstring, as is shown below. popup

tarjeiba commented 9 years ago

This no longer seems to be an issue in the latest pop-up version. Whatever you did that helped, thanks.