*** empty log message ***
authorroot <root>
Wed, 5 Nov 2008 12:28:14 +0000 (12:28 +0000)
committerroot <root>
Wed, 5 Nov 2008 12:28:14 +0000 (12:28 +0000)
Changes
src/command.C
src/init.C
src/main.C
src/screen.C

diff --git a/Changes b/Changes
index 83751797df5c9a903e903f1bd5f09be34e4a1cb5..fa2ea81873894b3bee4b5e1b5161d866bc01570a 100644 (file)
--- a/Changes
+++ b/Changes
@@ -54,6 +54,8 @@ TODO: cursor restore/rendition restore on rmcup
           tput init/tput reset, for older urxvts.
         - partial/full clear screens did cause flickering and possibly pixel
           droppings when urxvt viewed the scorllback buffer.
+        - use current rendition style in DCH sequence.
+        - the 132/80 mode switch no longer forces a screen reset.
 
 9.05 Sun Jun 15 20:09:20 CEST 2008
        - new option --cd/chdir to set the starting working directory.
index 0ddf12343052c5b825c9ae175c9c7ea7f05551a2..01e07a531c5162f3413f8bdd8e3dd51628e4f409 100644 (file)
@@ -3586,29 +3586,30 @@ rxvt_term::process_terminal_mode (int mode, int priv UNUSED, unsigned int nargs,
     const int       argval;
     const unsigned long bit;
   } argtopriv[] = {
-                  { 1, PrivMode_aplCUR },
+                  { 1, PrivMode_aplCUR },       // DECCKM
                   { 2, PrivMode_vt52 },
-                  { 3, PrivMode_132 },
-                  { 4, PrivMode_smoothScroll },
-                  { 5, PrivMode_rVideo },
-                  { 6, PrivMode_relOrigin },
-                  { 7, PrivMode_Autowrap },
-                 // 8, bi-directional support mode
+                  { 3, PrivMode_132 },          // DECCOLM
+                  { 4, PrivMode_smoothScroll }, // DECSCLM
+                  { 5, PrivMode_rVideo },       // DECSCNM
+                  { 6, PrivMode_relOrigin },    // DECOM
+                  { 7, PrivMode_Autowrap },     // DECAWM
+                 // 8, auto-repeat keys         // DECARM
                   { 9, PrivMode_MouseX10 },
                  // 18, 19 printing-related
-                  { 25, PrivMode_VisibleCursor },
+                  { 25, PrivMode_VisibleCursor }, // cnorm/cvvis/civis
 #ifdef scrollBar_esc
                   { scrollBar_esc, PrivMode_scrollBar },
 #endif
-                  { 35, PrivMode_ShiftKeys }, // rxvt extension
+                  { 35, PrivMode_ShiftKeys },   // rxvt extension
+                 // 38, tektronix mode          // DECTEK
                   { 40, PrivMode_132OK },
                  // 41 xterm more fixes NYI
                  // 45 margin bell NYI
                  // 46 start logging
                   { 47, PrivMode_Screen },
-                  { 66, PrivMode_aplKP },
+                  { 66, PrivMode_aplKP },       // DECPAM/DECPNM
 #ifndef NO_BACKSPACE_KEY
-                  { 67, PrivMode_BackSpace },
+                  { 67, PrivMode_BackSpace },   // DECBKM
 #endif
                   { 1000, PrivMode_MouseX11 },
                   { 1002, PrivMode_MouseBtnEvent },
@@ -3680,10 +3681,7 @@ rxvt_term::process_terminal_mode (int mode, int priv UNUSED, unsigned int nargs,
               break;
             case 3:                    /* 80/132 */
               if (priv_modes & PrivMode_132OK)
-                {
-                  scr_poweron ();
-                  set_widthheight (((state ? 132 : 80) * fwidth), 24 * fheight);
-                }
+                set_widthheight ((state ? 132 : 80) * fwidth, 24 * fheight);
               break;
             case 4:                    /* smooth scrolling */
               set_option (Opt_jumpScroll, !state);
@@ -3735,6 +3733,7 @@ rxvt_term::process_terminal_mode (int mode, int priv UNUSED, unsigned int nargs,
                 }
               else
                 vt_emask_mouse = NoEventMask;
+
               vt_select_input ();
               break;
             case 1010:         /* scroll to bottom on TTY output inhibit */
@@ -3747,6 +3746,7 @@ rxvt_term::process_terminal_mode (int mode, int priv UNUSED, unsigned int nargs,
               if (option (Opt_secondaryScreen))
                 if (current_screen != PRIMARY)
                   scr_erase_screen (2);
+
               scr_change_screen (state);
               break;
             case 1049:         /* secondary screen w/ clearing first */
index 0a9040e3493628f1a03cad9998bb457257ee41d1..6c9e6402da19f4d029bfcf779d51a618d624a8bc 100644 (file)
@@ -569,7 +569,7 @@ rxvt_term::init (int argc, const char *const *argv, stringvec *envv)
 
   init_xlocale ();
 
-  scr_reset (); // initialize screen
+  scr_poweron (); // initialize screen
 
 #if 0
   XSynchronize (dpy, True);
index 3b29ba8671dd254827d2f5d74225a8f2439a1e66..fd126ff70675ab1ffb13d1b15c175cc0259df239 100644 (file)
@@ -971,6 +971,9 @@ rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, in
 #endif
     }
 
+  if (set_hint)
+    XSetWMNormalHints (dpy, parent[0], &szHint);
+
   fix_screen = ncol != prev_ncol || nrow != prev_nrow;
 
   if (fix_screen || newwidth != old_width || newheight != old_height)
@@ -986,13 +989,8 @@ rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, in
       if (bgPixmap.window_size_sensitive ())
         update_background ();
 #endif
-
-      scr_clear ();
     }
 
-  if (set_hint)
-    XSetWMNormalHints (dpy, parent[0], &szHint);
-
   if (fix_screen || old_height == 0)
     scr_reset ();
 
index e94dc2e8531f68ad83deb2c29dea4998a52f9ed6..cd1c12549a49f6654a9ec5eafb349022f2e1c74f 100644 (file)
@@ -160,8 +160,6 @@ rxvt_term::scr_kill_char (line_t &l, int col) const NOTHROW
 void
 rxvt_term::scr_reset ()
 {
-  scr_soft_reset ();
-
   view_start = 0;
   num_scr = 0;
 
@@ -282,6 +280,7 @@ rxvt_term::scr_reset ()
         {
           // Re-wrap lines. This is rather ugly, possibly because I am too dumb
           // to come up with a lean and mean algorithm.
+          // TODO: maybe optimise when width didn't change
 
           row_col_t ocur = screen.cur;
           ocur.row = MOD (term_start + ocur.row, prev_total_rows);
@@ -438,6 +437,8 @@ rxvt_term::scr_poweron ()
 {
   scr_release ();
   prev_nrow = prev_ncol = 0;
+  rvideo_mode = false;
+  scr_soft_reset ();
   scr_reset ();
 
   scr_clear (true);
@@ -452,8 +453,6 @@ rxvt_term::scr_soft_reset ()
   scr_overlay_off ();
 #endif
 
-  rvideo_mode = false;
-
   if (current_screen != PRIMARY)
     scr_swap_screen ();
 
@@ -1543,8 +1542,7 @@ rxvt_term::scr_insdel_chars (int count, int insdel) NOTHROW
             line->r[col] = line->r[col + count];
           }
 
-        scr_blank_line (*line, ncol - count, count,
-                        line->r[ncol - 1] & (RS_fgMask | RS_bgMask | RS_baseattrMask));
+        scr_blank_line (*line, ncol - count, count, rstyle);
 
         if (selection.op && current_screen == selection.screen
             && ROWCOL_IN_ROW_AT_OR_AFTER (selection.beg, screen.cur))