initial rough-cut skipscroll
authorroot <root>
Mon, 18 Jun 2007 12:53:25 +0000 (12:53 +0000)
committerroot <root>
Mon, 18 Jun 2007 12:53:25 +0000 (12:53 +0000)
src/command.C
src/command.h
src/init.C
src/optinc.h
src/rsinc.h
src/rxvt.h
src/xdefaults.C

index cfb2eb1a45ce394a6635bba379394571d620c03b..e7ab402e7efaeb65964d97144e479dcd12f10212 100644 (file)
@@ -1112,7 +1112,6 @@ rxvt_term::flush_cb (time_watcher &w)
 {
   make_current ();
 
-  refresh_limit = 1;
   refresh_count = 0;
   flush ();
 }
@@ -1695,7 +1694,6 @@ rxvt_term::x_cb (XEvent &ev)
             scr_move_to (scrollbar_position (ev.xbutton.y) - csrO,
                          scrollbar_size ());
             want_refresh = 1;
-            refresh_limit = 0;
             scrollbar_show (1);
           }
         break;
@@ -2293,13 +2291,16 @@ rxvt_term::cmd_parse ()
 
                   refresh_count++;
 
-                  if (!option (Opt_jumpScroll)
-                      || (refresh_count >= refresh_limit * (nrow - 1)))
+                  if (!option (Opt_jumpScroll) || refresh_count >= nrow - 1)
                     {
-                      refreshnow = true;
                       refresh_count = 0;
-                      ch = NOCHAR;
-                      break;
+
+                      if (!option (Opt_skipScroll) || io_manager::now () > NOW + .1)
+                        {
+                          refreshnow = true;
+                          ch = NOCHAR;
+                          break;
+                        }
                     }
 
                   // scr_add_lines only works for nlines <= nrow - 1.
@@ -2337,21 +2338,14 @@ rxvt_term::cmd_parse ()
 
           /*
            * If there have been a lot of new lines, then update the screen
-           * What the heck I'll cheat and only refresh less than every page-full.
-           * the number of pages between refreshes is refresh_limit, which
-           * is incremented here because we must be doing flat-out scrolling.
+           * What the heck we'll cheat and only refresh less than every page-full.
+           * if skipScroll is enabled.
            */
           if (refreshnow)
             {
-              if (option (Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD)
-                refresh_limit++;
-              else
-                {
-                  flag = true;
-                  //TODO: due to popular request, implement "skipscroll" option here
-                  scr_refresh ();
-                  want_refresh = 1;
-                }
+              flag = true;
+              scr_refresh ();
+              want_refresh = 1;
             }
 
         }
index 8cd5f9ce1677d105481a4f0b0f8c488443d29c7b..a617428f3f7ddc0453258283c4455ffbf1d7ba6d 100644 (file)
@@ -10,9 +10,6 @@
 
 #define ESC_ARGS       32      /* max # of args for esc sequences */
 
-/* a large REFRESH_PERIOD causes problems with `cat' */
-#define REFRESH_PERIOD         1
-
 #ifndef MULTICLICK_TIME
 # define MULTICLICK_TIME       500
 #endif
index 3f035360aaa1f212104c3f98b693bc85375753b9..8c0f064dd6118c571364e17689b4983452c1b6f9 100644 (file)
@@ -201,7 +201,6 @@ rxvt_term::init_vars ()
   saveLines = SAVELINES;
   numpix_colors = TOTAL_COLORS;
 
-  refresh_limit = 1;
   refresh_type = SLOW_REFRESH;
 
   oldcursor.row = oldcursor.col = -1;
index 2c393d556ac2dbba40df19be06fe3007ff5a6975..319628a51c83b35b7b692a8ccf8526f6b72727ae 100644 (file)
@@ -17,6 +17,7 @@
  def(tripleclickwords,     14)
  def(scrollWithBuffer,     15)
  def(jumpScroll,           16)
+ def(skipScroll,           16)
  def(mouseWheelScrollPage, 17)
 #if POINTER_BLANK
  def(pointerBlank,         18)
index 09e7491ebcefe3ee811c0047cbf4035d2d943c00..4f1cb6181fe32fdc3f0dfc52a3e97fb74e7c5061 100644 (file)
@@ -22,6 +22,7 @@
 #endif
   def (loginShell)
   def (jumpScroll)
+  def (skipScroll)
 #ifdef HAVE_SCROLLBARS
   def (scrollBar)
   def (scrollBar_right)
index 1e6bd6a993e27b8439e26b9f3d90df38d8a42591..b3a9e14ae60380123a79579d1767dfa01b2c3ce3 100644 (file)
@@ -955,7 +955,6 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen {
                   mouse_slip_wheel_speed,
 #endif
                   refresh_count,
-                  refresh_limit,
                   last_bot,   /* scrollbar last bottom position            */
                   last_top,   /* scrollbar last top position               */
                   last_state, /* scrollbar last state                      */
index 1b6177bb2ac044f7188cbdc3aa37626c6d2d4848..b5da6e4dbec592813bf5635b3d7e3473691fdf57 100644 (file)
@@ -95,6 +95,7 @@ optList[] = {
               BOOL (Rs_reverseVideo, "reverseVideo", "rv", Opt_reverseVideo, 0, "reverse video"),
               BOOL (Rs_loginShell, "loginShell", "ls", Opt_loginShell, 0, "login shell"),
               BOOL (Rs_jumpScroll, "jumpScroll", "j", Opt_jumpScroll, 0, "jump scrolling"),
+              BOOL (Rs_skipScroll, "skipScroll", "ss", Opt_skipScroll, 0, "skip scrolling"),
               BOOL (Rs_pastableTabs, "pastableTabs", "ptab", Opt_pastableTabs, 0, "tab characters are pastable"),
 #if HAVE_SCROLLBARS
               RSTRG (Rs_scrollstyle, "scrollstyle", "mode"),