Skip to content

Commit

Permalink
one too many lines were being cleared after input.
Browse files Browse the repository at this point in the history
This was likely caused by a loading symbol spilling into the first input
prompt (see issue #1).  NOTE: This change prevents empty input prompts,
but there should always be text in a prompt.
  • Loading branch information
chrismeyers committed Feb 18, 2019
1 parent e578fb9 commit e39af55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pleasehold/stream_tee.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def __getattr__(self, name):

def __methodmissing__(self, *args, **kwargs):
'''Callback for events coming from the original stream'''
if len(args) > 0 and args[0] != '\n' and args[0] != self._loading_symbol:
if (len(args) > 0 and args[0] != '\n' and args[0] != ''
and args[0] != self._loading_symbol):
self._num_inputs += 1

# Emit method call to the forked stream
Expand Down

0 comments on commit e39af55

Please sign in to comment.