3 ms·
>> screen contents persisted through full-screen programs > doesn't this depend on whether the program calls curses endwin() function ? why does tmux/screen ne
by a3_nm 12y ago
>> screen contents persisted through full-screen programs
> doesn't this depend on whether the program calls curses endwin() function ? why does tmux/screen need to know about this ?
I just tested out of curiosity. Running vim and exiting in tmux reverts to the previous screen contents, like in raw urxvt; in screen, the previous screen contents are lost. I do not know why.
- SoftwareMaven 12y agoAnd I just tested it, too, and my terminal contents were restored. As they were with nano and emacs.
- lmz 12y agoAccording to this page it is related to the smcup & rmcup capability: http://chenyufei.info/blog/2011-12-15/prevent-vim-less-clear-screen-on-exit/ http://chenyufei.info/blog/2011-12-15/prevent-vim-less-clear...
- keeperofdakeys 12y agoThis is a weird feature called a "secondary screen", which means that the terminal secretly has a second buffer to draw ncurses programs on. The OP probably had this disabled in screen, so it didn't work in their terminal.
- bgaluszka 12y agoBy [1] To turn it on add 'altscreen on' to ~/.screenrc [1] https://wiki.archlinux.org/index.php/GNU_Screen https://wiki.archlinux.org/index.php/GNU_Screen