[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Carlos Pita
Subject: bug#33959:
Date: Thu, 3 Jan 2019 02:38:52 -0300

> but I see no reason to not call (erase-buffer) altogether.
> Do you?

Yes, obviously, multiline input, I forgot.

Nevertheless I found the origin of the problem. Somehow when company
is enabled in the shell buffer
python-shell-font-lock-comint-output-filter-function is getting empty
strings as output and then the ";; Otherwise just add a newline."
clause is activated.

No matter the reason why empty output is being passed to the filter,
it's wrong for the filter to add a new line to the font lock buffer if
this happens.

I'm attaching two patches, since
python-shell-font-lock-comint-output-filter-function is an old friend
of mine and we have spent many nights together now:

1. The first one (Avoid-spurious...) strictly fixes this issue by
moving the not-empty condition to the top and doing everything else
unless not-empty. Period. That works.

2. The second one (Fix-font-lock...) combines 1 with my previous patch
for fixing ipython multiline input (#32390) since both changes

I suggest to directly apply patch 2 since it improves prompt detection
heuristic and fixes two bugs. Then you can close this and #32390.


Attachment: 0001-Avoid-spurious-empty-lines-in-font-lock-buffer-fixes.patch
Description: Text Data

Attachment: 0001-Fix-font-lock-output-filter-bugs-33959-and-32390.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]