From a5a22bb1f0a543e1264932f7da4de5773f507850 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 5 Nov 2008 12:28:14 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 2 ++ src/command.C | 30 +++++++++++++++--------------- src/init.C | 2 +- src/main.C | 8 +++----- src/screen.C | 10 ++++------ 5 files changed, 25 insertions(+), 27 deletions(-) diff --git a/Changes b/Changes index 83751797..fa2ea818 100644 --- 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. diff --git a/src/command.C b/src/command.C index 0ddf1234..01e07a53 100644 --- a/src/command.C +++ b/src/command.C @@ -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 */ diff --git a/src/init.C b/src/init.C index 0a9040e3..6c9e6402 100644 --- a/src/init.C +++ b/src/init.C @@ -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); diff --git a/src/main.C b/src/main.C index 3b29ba86..fd126ff7 100644 --- a/src/main.C +++ b/src/main.C @@ -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 (); diff --git a/src/screen.C b/src/screen.C index e94dc2e8..cd1c1254 100644 --- a/src/screen.C +++ b/src/screen.C @@ -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)) -- 2.34.1