Ticket #213 (new defect)

Opened 8 months ago

With output caching disabled, empty lines cause problems

Reported by: marc Assigned to: fperez
Priority: normal Milestone:
Component: ipython Version:
Severity: normal Keywords:
Cc:

Description

When output caching is disabled, and entering an empty line by just hitting enter, i hit a problem on line 538 of Prompts.py, because the self.prompt_count index becomes larger but the self.input_hist list does not, causing an IndexError?.

I solved it by removing the full_cache condition part on line 202/203 of Logger.Py (i.e. if out_cache.do_full_cache and \), however I'm not sure if this condition was there to protect something else from causing crashes :). It seems to work fine for now. Maybe a better solution anyway is to just take the last element of input_hist?