Skip to content

Commit

Permalink
Clear the screen before initial paint
Browse files Browse the repository at this point in the history
If the terminal previously did show another curses application (e.g.
VIM) that content might be shown upon starting alot until the first
command has been executed and the result printed. By simply clearing the
screen before entering the mainloop we can work around that.
  • Loading branch information
andir authored and pazz committed May 6, 2020
1 parent 98b1040 commit a1a2436
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions alot/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def __init__(self, dbman, initialcmdline):
logging.info('setup gui in %d colours', colourmode)
self.mainloop.screen.set_terminal_properties(colors=colourmode)

# clear the screen before the initial frame
self.mainloop.screen.clear()

logging.debug('fire first command')
loop.create_task(self.apply_commandline(initialcmdline))

Expand Down

0 comments on commit a1a2436

Please sign in to comment.