AnalogTerm2: Adapt smooth scrolling disabled cursor delay to steps
authorMatthew Mondor <mmondor@pulsar-zone.net>
Thu, 27 Apr 2023 00:58:03 +0000 (00:58 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Thu, 27 Apr 2023 00:58:03 +0000 (00:58 +0000)
mmsoftware/analogterm2/TODO.txt
mmsoftware/analogterm2/src/state.c

index cd102ac..052add1 100644 (file)
@@ -1,3 +1,6 @@
+- Now that the smooth scrolling pixel-skip can be configured, probably adapt
+  the 65543 ATC sequence to support a parameter.  Currently only the -2
+  command line option or config.h allow to change it.
 - Many operations are the equivalent of newline or scroll if the end of the
   scrolling buffer or bottom are reached.  Unify those in a function or two as
   possible.
index 9b38a86..e04c61e 100644 (file)
@@ -422,7 +422,8 @@ state_scroll_range(state_t *st, int offset)
                         */
                        st->smoothscroll_offset = FONT_HEIGHT + cfg_leading;
                        st->cursor_disabled_ticks =
-                          (int)(st->smoothscroll_offset * 1.5);
+                          (int)((st->smoothscroll_offset /
+                                 cfg_smoothscrollskip) * 1.5);
                        state_update_cursor(st);
                }
        } else {