-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: b2568330e3795ac80d9aa8cc1ce8c23d5a0bc317:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit b2568330e3795ac80d9aa8cc1ce8c23d5a0bc317
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Mon Jun 18 12:53:26 2007 +0000

    initial rough-cut skipscroll

diff --git a/src/command.C b/src/command.C

index cfb2eb1a45ce394a6635bba379394571d620c03b..

index ..e7ab402e7efaeb65964d97144e479dcd12f10212 100644

--- a/src/command.C
+++ b/src/command.C
@@ -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;
             }

         }
diff --git a/src/command.h b/src/command.h

index 8cd5f9ce1677d105481a4f0b0f8c488443d29c7b..

index ..a617428f3f7ddc0453258283c4455ffbf1d7ba6d 100644

--- a/src/command.h
+++ b/src/command.h
@@ -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
diff --git a/src/init.C b/src/init.C

index 3f035360aaa1f212104c3f98b693bc85375753b9..

index ..8c0f064dd6118c571364e17689b4983452c1b6f9 100644

--- a/src/init.C
+++ b/src/init.C
@@ -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;
diff --git a/src/optinc.h b/src/optinc.h

index 2c393d556ac2dbba40df19be06fe3007ff5a6975..

index ..319628a51c83b35b7b692a8ccf8526f6b72727ae 100644

--- a/src/optinc.h
+++ b/src/optinc.h
@@ -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)
diff --git a/src/rsinc.h b/src/rsinc.h

index 09e7491ebcefe3ee811c0047cbf4035d2d943c00..

index ..4f1cb6181fe32fdc3f0dfc52a3e97fb74e7c5061 100644

--- a/src/rsinc.h
+++ b/src/rsinc.h
@@ -22,6 +22,7 @@
 #endif
   def (loginShell)
   def (jumpScroll)
+  def (skipScroll)
 #ifdef HAVE_SCROLLBARS
   def (scrollBar)
   def (scrollBar_right)
diff --git a/src/rxvt.h b/src/rxvt.h

index 1e6bd6a993e27b8439e26b9f3d90df38d8a42591..

index ..b3a9e14ae60380123a79579d1767dfa01b2c3ce3 100644

--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -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                      */
diff --git a/src/xdefaults.C b/src/xdefaults.C

index 1b6177bb2ac044f7188cbdc3aa37626c6d2d4848..

index ..b5da6e4dbec592813bf5635b3d7e3473691fdf57 100644

--- a/src/xdefaults.C
+++ b/src/xdefaults.C
@@ -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"),

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 12:14:06 2024