Skip to content

Commit

Permalink
Small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
magmax committed Nov 27, 2014
1 parent c725819 commit 4956069
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions inquirer/render/console/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ def __init__(self, event_generator=None, *args, **kwargs):
self._previous_error = None
self._position = 0

def reset(self):
print(self.terminal.move(0, 0) + self.terminal.clear_eos())
self._position = 1

def render(self, question, answers=None):
question.answers = answers or {}

Expand Down Expand Up @@ -100,14 +96,14 @@ def _process_input(self, render):
q=render.question.name))

def _relocate(self):
print(self._position * self.terminal.move_up)
self._position = 1
print(self._position * self.terminal.move_up, end='')
self._position = 0

def _go_to_end(self, render):
positions = len(list(render.get_options())) - self._position
if positions > 0:
print(self._position * self.terminal.move_down)
self._position = 1
print(self._position * self.terminal.move_down, end='')
self._position = 0

def _force_initial_column(self):
self.print_str(self.terminal.move_x(0))
Expand Down

0 comments on commit 4956069

Please sign in to comment.