vt.c small patch



Hi Jacob,
this is a small patch for vt.c file 
for restoring terminal screen when one exits from 
full screen applications such as 'vim' or 'emacs -nw',
basically the terminal emulator now handles also
the state 6 with arg 1049(on/off), which corresponds to 
ti/te termcap capabilities,

				cheers Cristiano
 
-- 
  Cristiano De Michele,
  Department of Physics,
  University "Federico II" of Naples
--- /home/demichel/sources/gnome-libs-1.4.1.5/zvt/vt.c	Mon Mar 18 20:39:22 2002
+++ gnome-terminal/vt.c	Wed Apr 17 00:17:18 2002
@@ -42,7 +42,7 @@
 #include "subshell.h"
 
 /* define to 'x' to enable copious debug of this module */
-#define d(x)
+#define d(x) 
 
 /* this one will check nodes aren't 'past' the end of list */
 #define n(x)
@@ -1117,6 +1117,7 @@
       }
       break;
     case 6:
+      d(printf("state 6 arg: %d\n", vt->arg.num.intargs[i]));
       switch(vt->arg.num.intargs[i]) {
       case 1:			/* turn on application cursor keys */
 	if (on)
@@ -1163,6 +1164,14 @@
 	vt->mode &= ~VTMODE_SEND_MOUSE_MASK;
 	if (on)
 	  vt->mode |= VTMODE_SEND_MOUSE_BOTH;
+	break;
+      case 1049:
+	/* here the application should save the screen and restore it as xterm does!*/
+	vt_set_screen(vt, on?1:0);
+	if (on)
+	  vt_save_cursor(vt);
+	else
+	  vt_restore_cursor(vt);
 	break;
       case 1048:
 	if (on)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]