Open cherryman opened 6 years ago
maybe triggering a resize event on reconnection can solve this issue?
My guess would be that the program being wrapped is trying to be too smart with SIGWINCH (which abduco sends to tell a wrapped program to redraw) that it receives, and is opting not to redraw because the dimensions of the terminal before and after the SIGWINCH are the same. If this is the case, the problem being intermittent like you describe is probably a result of the terminal sometimes having different dimensions on attachment than at the last redraw.
It is probably best to contact the maintainers of the software in question.
@phillid Makes sense! However, I don't think the maintainers of the software are at fault. There is no reason one should expect SIGWINCH to signal anything other than a window resize. If the program covers all possible use cases for when a window is resized then it's working as intended. abduco is relying on a coincidence.
My current editor (Kakoune) doesn't redraw everything on resize. This leaves it almost unusable when attaching with no way to fix it without restarting it.
I think abduco should remember the state of the terminal.
This can be easily seen in a pager.
Connecting the first time often works (but not always).
However, upon re-attaching, the terminal is usually emtpy, and requires scrolling to actually redraw.
This isn't perfectly consistent. Sometimes, after restarting the terminal, it redraws the first time but not the second.