Re: vt.c small patch
Owen Taylor <[email protected]> Wed, 17 Apr 2002 11:26:38 -0400 (EDT)
| Newsgroups | gmane.comp.gnome.lib.devel |
|---|---|
| Message-ID | <[email protected]> |
Cristiano De Michele <[email protected]> writes: > On Wed, 2002-04-17 at 16:01, Owen Taylor wrote: > > > > Cristiano De Michele <[email protected]> writes: > > > > > Hi Owen, > > > ah yes this is how to reproduce what I think is a problem :): > > > open an xterm and run for example vim or emacs -nw when you exit > > > the screen before entering such apps is got back, > > > gnome-terminal instead put all output of that apps into the buffer. > > > With my patch GT behaves as xterm (or rxvt) > > > check and let me know, > > > > This probably has something to do with your termcap, since it > > works perfectly for me. What sort of system are you using? What > > is the TERM environment variable set to? > > > > Regards, > > Owen > > > > > Dear Owen, > I don't think so, I've just checked looking into the termcap file given > with xterm-164 and the escape sequences for te/ti capabilities are > [?1049h and [?1049l so I think the actual unpatched vt.c is wrong. > I also attached the termcap file, Hmmm, this seems to be a XFree86 xterm'ism. To quote from Dickey's ChangeLog: Patch #90 - 1998/12/13 - XFree86 3.9Nq Implement new escape sequence, private mode 1049, which combines the switch to/from alternate screen mode with screen clearing and cursor save/restore. Unlike the existing escape sequence, this clears the alternate screen when switching to it rather than when switching to the normal screen, thus retaining the alternate screen contents for select/paste operations. When I implemented the popup menu entry to toggle between the normal and alternate screens, I considered only pasting from the normal screen to the alternate; this improvement allows either direction. # Changed the termcap and terminfo for xterm-xfree86 and xterm-8bit to use the new 1049 private mode. The termcap from ncurses on my system uses 1047 and 1048. It seems like it shouldn't do any harm to support 1049 in addition. But it looks like your patch doesn't get the screen clearing behavior right. (Or in fact clear the alternate screen at all.) The vte emulator that Nalin is hacking on is cool (and a little backwards) in that it actually reads the termcap entry and uses those escape sequences; which should fix this sort of problem, where the 'xterm' termcap entry is different on every system. Regards, Owen