texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[5940] c-u m-x scroll-forward scrolls four lines, not four screens


From: Gavin D. Smith
Subject: [5940] c-u m-x scroll-forward scrolls four lines, not four screens
Date: Fri, 21 Nov 2014 19:47:53 +0000

Revision: 5940
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5940
Author:   gavin
Date:     2014-11-21 19:47:51 +0000 (Fri, 21 Nov 2014)
Log Message:
-----------
c-u m-x scroll-forward scrolls four lines, not four screens

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/Makefile.am
    trunk/info/session.c
    trunk/info/t/infodir/intera.info

Added Paths:
-----------
    trunk/info/t/c-u-m-x-scroll-forward.sh

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-11-21 18:29:27 UTC (rev 5939)
+++ trunk/ChangeLog     2014-11-21 19:47:51 UTC (rev 5940)
@@ -1,5 +1,11 @@
 2014-11-21  Gavin Smith  <address@hidden>
 
+       * info/session.c (read_key_sequence): Set info_explicit_arg or 
+       ea_explicit_arg if argument was given with sequence of C-u's.
+       * info/t/c-u-m-x-scroll-forward.sh: New test.
+
+2014-11-21  Gavin Smith  <address@hidden>
+
        * doc/texinfo.texi (Top Node Naming): Fix typo.
 
 2014-11-21  Gavin Smith  <address@hidden>

Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am      2014-11-21 18:29:27 UTC (rev 5939)
+++ trunk/info/Makefile.am      2014-11-21 19:47:51 UTC (rev 5940)
@@ -118,6 +118,7 @@
        t/end-of-line.sh \
        t/goal-column.sh \
        t/star-note-non-whitespace.sh \
+       t/c-u-m-x-scroll-forward.sh \
        t/last-no-history.sh \
        t/split-footnotes.sh \
        t/window-split-dir.sh \

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2014-11-21 18:29:27 UTC (rev 5939)
+++ trunk/info/session.c        2014-11-21 19:47:51 UTC (rev 5940)
@@ -5155,10 +5155,11 @@
         }
       else if (func == &info_universal_argument)
         {
-          /* This means multiply by 4. */
-          /* info_explicit_arg seems to be doing double duty so that
-             C-u 2 doesn't mean 42. */
-          numeric_arg *= 4;
+          /* Multiply by 4. */
+          /* TODO: Maybe C-u should also terminate the universal argument 
+             sequence, as in Emacs. (C-u 6 4 C-u 1 inserts 64 1's.) */
+          if (!*which_explicit_arg)
+            numeric_arg *= 4;
           reading_universal_argument = 1;
         }
       else if (menu && func == &info_menu_digit)
@@ -5189,6 +5190,13 @@
 
           if (count)
             *count = numeric_arg * numeric_arg_sign;
+
+          /* *which_explicit_arg has not been set yet if only a sequence of 
+             C-u's was typed (each of which has multiplied the argument by 
+             four).  */
+          if (*count != 1 && !*which_explicit_arg)
+            *which_explicit_arg = 1;
+
           return func;
         }
       else if (map[key].type == ISKMAP)

Added: trunk/info/t/c-u-m-x-scroll-forward.sh
===================================================================
--- trunk/info/t/c-u-m-x-scroll-forward.sh                              (rev 0)
+++ trunk/info/t/c-u-m-x-scroll-forward.sh      2014-11-21 19:47:51 UTC (rev 
5940)
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Copyright (C) 2014 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+srcdir=${srcdir:-.}
+. $srcdir/t/Init-test.inc
+. $t/Init-inter.inc
+
+# Set screen geometry so that scrolling down by screens goes to 
+# predictable places.  5 lines of the node should be visible at once, 1 
+# status line and 1 line for the echo area.
+# This relies on the TIOCGWINSZ ioctl failing for the pseudotty (see 
+# terminal_get_screen_size in terminal.c).
+export LINES=7 COLUMNS=80
+
+run_ginfo -f intera -n 'Scroll four lines'
+
+# C-u M-x scroll-forward should scroll four lines, not four screens
+printf '\025\033xscroll-forward\r' >$PTY_TYPE
+printf '\rDq' >$PTY_TYPE
+
+. $t/Timeout-test.inc
+
+# Return non-zero (test failure) if files differ
+diff $GINFO_OUTPUT $t/node-target
+RETVAL=$?
+
+. $t/Cleanup.inc
+


Property changes on: trunk/info/t/c-u-m-x-scroll-forward.sh
___________________________________________________________________
Added: svn:executable
   + *

Modified: trunk/info/t/infodir/intera.info
===================================================================
(Binary files differ)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]