selectel / pyte

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

Known rendering quirks #84

Open superbobry opened 7 years ago

superbobry commented 7 years ago

This is an incomplete list of apps which are known to be rendered incorrectly with TERM=linux. Every quirk in the list potentially indicates a bug in one of the Screen method. These bugs are notoriously hard to pin down, but if you're feeling brave -- contributions are more than welcome!

To validate the quirk start webterm.py

$ PYTHONPATH=. python webterm.py

and type the corresponding command.

Wramberg commented 7 years ago

I have been running into some trouble in version 0.6 and on master. When i suspend nano I cannot resume it again. When I do the screen freezes. It is quite easy to reproduce using webterm.py.

I was using some old version of pyte before (https://github.com/Wramberg/TerminalView/tree/5863c7d7818638019ff7c96f2f476ebb9222f415/pyte) where it worked. If I find time I'll try to dig a bit more into it myself but maybe someone else has some ideas where to start ?

Wramberg commented 7 years ago

Seems to work in 0.5.2 In 0.6.0 it freezes like described

superbobry commented 7 years ago

Hi @Wramberg, thanks for reporting this. Could you kindly try the master version and let me know if it works for you?

Wramberg commented 7 years ago

Hey @superbobry, issue is fixed on the latest version of master :+1:

Wramberg commented 7 years ago

On 0.5.2 and master I've been seeing some weird behavior when using ranger. It happens when ranger is scrolling the list of files. For example, if I have a display showing this

jw@jw-VirtualBox:/home/jw/color_gen.py
 jw            Public                                 0  def get_color_template(bg_name, bg_val, fg_name, fg_val):
               pyte                                  17     return """
               somepkg                                4        <dict>
               Templates                              0           <key>scope</key>
               TerminalView                          22           <string>terminalview.%s_%s</string>
               Videos                                 0           <key>settings</key>
               wramberg_linux_setup                   9           <dict>
               a.out                                  0              <key>background</key>
               color_gen.py                       967 B              <string>%s</string>
               colors.txt                        19.3 K              <key>foreground</key>
               examples.desktop                  8.77 K              <string>%s</string>
               MC                                     0           </dict>
               README.md                         1.89 K        </dict> """ % (bg_name, fg_name, bg_val, fg_val)
               test_spam.sh                        65 B
               test1497819147.save                  4 B  bgcolors = {
               test1497819252.save                  4 B     "black": "#000001",
               test1497819760.save                  4 B     "white": "#c5c8c6",
               test1497822284.save                  4 B     "red": "#a54242",
-rw-rw-r-- 1 jw jw 967B 2017-05-31 16:32                                               162K sum, 33G free  16/27  78%

with the cursor standing on the "color_gen.py" file. If I send arrow up to the shell I expect all files to scroll one line - I get the following back from the shell (hex)

1b371b5b31313b3139721b380d0a1b4d1b5b313b3230721b5b313b3237481b5b303b31303b316d612e6f75741b5b4b1b5b323b3137481b5b33346d696374757265731b5b323b3537481b5b33396d1b5b303b31306d1b5b4b1b5b333b3136481b5b303b31303b316d1b5b33346d5075626c69631b5b333b3534482030201b5b33396d1b5b303b31306d1b5b4b1b5b343b3136481b5b303b31303b316d1b5b33346d707974652020201b5b343b3534483137201b5b33396d1b5b303b31306d1b5b4b1b5b353b3136481b5b303b31303b316d1b5b33346d736f6d65706b6720201b5b353b35354834201b5b33396d1b5b303b31306d1b5b4b1b5b363b3138481b5b303b31303b316d1b5b33346d6d706c617465732020201b5b363b3534482030201b5b33396d1b5b303b31306d1b5b4b1b5b373b3136481b5b303b31303b316d1b5b33346d5465726d696e616c566965771b5b373b3534483232201b5b33396d1b5b303b31306d1b5b4b1b5b383b3136481b5b303b31303b316d1b5b33346d566964656f731b5b3134581b5b383b35354830201b5b33396d1b5b303b31306d1b5b4b1b5b393b3136481b5b303b31303b316d1b5b33346d7772616d626572675f6c696e75785f73657475701b5b3139581b5b393b35354839201b5b33396d1b5b303b31306d1b5b4b1b5b31303b3136481b5b303b31303b373b316d612e6f7574202020202020201b5b31303b3531482020202030201b5b303b31306d1b5b4b1b5b31313b3135481b5b303b31303b316d1b5b33316d201b5b303b31306d636f6c6f725f67656e2e70791b5b31313b35314839363720421b5b31323b3730481b5b303b31306d1b5b4b0a1b5b4b0a0808081b5b4b0a0808081b5b4b1b5b31373b3538481b5b4b0a2020201b5b4b0a1b5b4b1b5b32303b3230483020323031372d30362d31312032313a34352020201b5b32303b31303948352f3237202036371b5b31303b3135481b5b303b31306d

and the pyte display is updated to this

jw@jw-VirtualBox:/home/jw/a.out
 jw            Pictures                               0
               Public                                 0
               pyte                                  17
               somepkg                                4
               Templates                              0
               TerminalView                          22
               Videos                                 0
               wramberg_linux_setup                   9
               a.out                                  0
               color_gen.py                      1967 B              <key>foreground</key>
               examples.desktop                  8.77 K
               MC                                     0           </d
               README.md                         1.89 K        </d
               test_spam.sh                        65 B
               test1497819147.save                  4 B  bgcolors = {
               test1497819252.save                  4 B
               test1497819760.save                  4 B
               test1497822284.save                  4 B
-rw-rw-r-- 1 jw jw 0 2017-06-11 21:45                                                  162K sum, 33G free  15/27  67%

Note how "colors.txt" disappeared and all lines below just stay the same. Furthermore some of the lines on the right did not disappear. I am using TERM=linux btw.

superbobry commented 7 years ago

Sorry, I don't have the time to debug this in the coming weeks. In case you want to have a peek yourself, try going sequence-by-sequence over the output causing the issue with DebugScreen.