Bug #2397
xterm window content cleared after man(1) exit
| Status: | Closed | Start date: | 07/22/2012 | ||
|---|---|---|---|---|---|
| Priority: | Normal | Due date: | |||
| Assignee: | - | % Done: | 90% |
||
| Category: | - | ||||
| Target version: | - |
Description
Starting with commit 3ac91e86fba7d34199699a87e1ff109aacc8eec4 "ncurses: move USE_GETCAP, update README files", xterm now clears its window when the end of a man page is reached and the man(1) program exits.
The behavior makes it impossible to read a complete man page without piping the output to less(1), which is very annoying.
setting TERM=cons25 in xterm can be used as a workaround but breaks curse-based applications.
Related todos
History
Updated by marino 10 months ago
These links give hints what needs to be changed:
https://blogs.oracle.com/samf/entry/smcup_rmcup_hate
from: http://chenyufei.info/blog/2011-12-15/prevent-vim-less-clear-screen-on-exit/
Updated by marino 10 months ago
- Status changed from New to Feedback
This patch fixes the issue for me:
http://leaf.dragonflybsd.org/~marino/0002-xterm-Remove-ability-to-restore-console-after-man-le.patch
I touched /usr/src/lib/libnurses/libncurses/Makefile after applying it, then ran "make -j 8 quickworld && make installworld".
After that, man(1) and the pagers don't restore the screen after running.
If you confirm, I'll commit the patch.
Updated by ftigeot 10 months ago
- Status changed from Feedback to In Progress
- % Done changed from 0 to 90
Fix confirmed, man(1) once again behaves as it used to.
Updated by marino 10 months ago
Thanks for the confirmation, Francois.
http://gitweb.dragonflybsd.org/dragonfly.git/commit/fa9d1446df0fc2629c6ebad4eef85d54ffecac4c