Skip to content

Commit

Permalink
Make sure -R clears the screen in the non-ncurses case.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyklyukin committed Jul 23, 2013
1 parent 97b8eef commit 5d255dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pg_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -2496,9 +2496,14 @@ def do_loop(screen, groups, output_method, collectors):
st.diff()
if output_method == OUTPUT_METHOD.curses:
process_groups(groups)
# in the non-curses cases display actually shows the data and refresh
# clears the screen, so we need to refresh before display to clear the old data.
if options.clear_screen and output_method != OUTPUT_METHOD.curses:
output.refresh()
for st in collectors:
output.display(st.output(output_method))
if options.clear_screen or output_method == OUTPUT_METHOD.curses:
# in the curses case, refresh shows the data queued by display
if output_method == OUTPUT_METHOD.curses:
output.refresh()
time.sleep(TICK_LENGTH)

Expand Down

0 comments on commit 5d255dd

Please sign in to comment.