selectel / pyte

Simple VTXXX-compatible linux terminal emulator
http://pyte.readthedocs.org/
GNU Lesser General Public License v3.0
658 stars 102 forks source link

Reverse complete screen on setting DECSCNM mode #102

Closed zblz closed 6 years ago

zblz commented 6 years ago

Right now, pyte will reverse all displayed characters when the DECSCNM mode is set. However, this leaves the empty parts of the screen non-reversed because the default value of the buffer defaultdict is a non-reversed Char.

This PR makes Screen.default_char a property that depends on the mode DECSNM being set, and in addition replaces the default value on the lines that have been already been displayed.

This behaviour can be tested with vttest menu 2.

zblz commented 6 years ago

The test failure on Python 2.6 seems transient and unrelated to the PR, can somebody with permission restart the build?

superbobry commented 6 years ago

Thank you very much! This is subtle. Would you mind if I add you to the list of contributors?