abduco icon indicating copy to clipboard operation
abduco copied to clipboard

Output isn't redrawn when attaching to a session

Open cherryman opened this issue 7 years ago • 3 comments

This can be easily seen in a pager.

abduco -c man man man

Connecting the first time often works (but not always).

abduco -a man

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.

cherryman avatar Nov 26 '17 20:11 cherryman

maybe triggering a resize event on reconnection can solve this issue?

Javyre avatar Jan 20 '18 22:01 Javyre

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 avatar Jul 24 '18 08:07 phillid

@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.

SeerLite avatar Jul 25 '22 04:07 SeerLite