Closed guymorlan closed 1 year ago
Yup, this sort of thing will definitely be supported. The reason it doesn't work today is because we don't do proper terminal emulation, we just try to filter out escape sequences. I.e., we need to do terminal emulation.
Some thoughts on implementation (mostly to myself):
I'd like to not use terminal buffers to show outputs; that's because I plan on migrating to using virtual lines and virtual text to display output instead of floating windows, and terminal buffers require floating windows.
However, there is a neat workaround we can use so that we don't have to implement terminal emulation ourselves (terminal emulation is somewhat tricky): we keep a hidden terminal buffer where we write the cell's output. Then, to show it on the screen, we read the terminal buffer's contents and display that -- which we can do either with the current floating window display architecture and with the future virtual lines/text architecture.
I'm not proud of my fix, but it works for now
Can the plugin be made to work with progress bars such as tqdm that rewrite the buffer? Thanks