Skip to content

Commit

Permalink
Fix CLI screen corruption (#1704)
Browse files Browse the repository at this point in the history
The CLI would often have temporary screen corruption.  This reworks
several things to correct that issue, although it looks like the
ultimate cause was drawing to the screen while in the middle of
waiting on a VT100 ESC keycode sequence.

* Rearchitected all screen drawing to run in a single thread.  Now
  call set_screen_dirty() instead of draw_screen()
* Added a lock on accessing the various Log buffers, preventing
  changes to the buffer in the middle of a redraw
* Modified key reading logic when ESC character is received.  Now
  uses a 1 second timeout if no subsequent keycodes are sent
* Catch several special exceptions.  Curses throws exceptions in some cases during get_wch(), such as
when you Ctrl+Z suspend the CLI the resume the process.  Also moved Ctrl+C processing into this exception handler.
  • Loading branch information
Steve Penrod committed Jul 30, 2018
1 parent ec73b7d commit 040b64d
Showing 1 changed file with 141 additions and 90 deletions.
Loading

0 comments on commit 040b64d

Please sign in to comment.