texinfo-commits
[Top][All Lists]
Advanced

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

[5851] numeric argument for move-to-next-xref


From: Gavin D. Smith
Subject: [5851] numeric argument for move-to-next-xref
Date: Tue, 30 Sep 2014 19:22:46 +0000

Revision: 5851
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5851
Author:   gavin
Date:     2014-09-30 19:22:44 +0000 (Tue, 30 Sep 2014)
Log Message:
-----------
numeric argument for move-to-next-xref

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

Added Paths:
-----------
    trunk/info/t/tab-argument.sh

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-09-29 14:37:42 UTC (rev 5850)
+++ trunk/ChangeLog     2014-09-30 19:22:44 UTC (rev 5851)
@@ -1,3 +1,10 @@
+2014-09-30  Gavin Smith  <address@hidden>
+
+       * info/session.c (info_move_to_next_xref) 
+       (info_move_to_prev_xref): If an argument is given with C-u, go 
+       forward or backward that number of references.
+       * info/t/tab-argument.sh: New test.
+
 2014-09-29  Gavin Smith  <address@hidden>
 
        * info/indices.c (info_index_search, do_info_index_search): 

Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am      2014-09-29 14:37:42 UTC (rev 5850)
+++ trunk/info/Makefile.am      2014-09-30 19:22:44 UTC (rev 5851)
@@ -106,6 +106,7 @@
        t/dir-menus-sloppily.sh \
        t/where-dir-file.sh \
        t/tab.sh \
+       t/tab-argument.sh \
        t/body-start.sh \
        t/end-of-line.sh \
        t/goal-column.sh \

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2014-09-29 14:37:42 UTC (rev 5850)
+++ trunk/info/session.c        2014-09-30 19:22:44 UTC (rev 5851)
@@ -2603,10 +2603,13 @@
     info_move_to_next_xref (window, -count, key);
   else
     {
-      while (1)
+      while (count > 0)
         {
           if (info_move_to_xref (window, -1))
-            return;
+            {
+              count--;
+              continue;
+            }
 
           /* When cursor-movement-scrolls=Off, cycle round the node's
              references. */
@@ -2622,10 +2625,11 @@
                     i++;
                   window->point = r[i]->start;
                   window_adjust_pagetop (window);
+                  count--;
+                  continue;
                 }
-              else
-                info_error ("%s", msg_no_xref_node);
-
+                
+              info_error ("%s", msg_no_xref_node);
               return;
             }
 
@@ -2646,10 +2650,13 @@
     info_move_to_prev_xref (window, -count, key);
   else
     {
-      while (1)
+      while (count > 0)
         {
           if (info_move_to_xref (window, 1))
-            return;
+            {
+              count--;
+              continue;
+            }
 
           /* When cursor-movement-scrolls=Off, cycle round the node's
              references. */
@@ -2662,10 +2669,11 @@
                      node. */
                   window->point = r[0]->start;
                   window_adjust_pagetop (window);
+                  count--;
+                  continue;
                 }
-              else
-                info_error ("%s", msg_no_xref_node);
-
+                
+              info_error ("%s", msg_no_xref_node);
               return;
             }
 

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

Added: trunk/info/t/tab-argument.sh
===================================================================
--- trunk/info/t/tab-argument.sh                                (rev 0)
+++ trunk/info/t/tab-argument.sh        2014-09-30 19:22:44 UTC (rev 5851)
@@ -0,0 +1,30 @@
+#!/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
+
+run_ginfo -f intera -n 'Argument to tab'
+# C-u 2 TAB to go to second link
+printf '\0252\t\rDq' >$PTY_TYPE
+. $t/Timeout-test.inc
+
+diff $GINFO_OUTPUT $t/node-target
+RETVAL=$?
+
+. $t/Cleanup.inc
+


Property changes on: trunk/info/t/tab-argument.sh
___________________________________________________________________
Added: svn:executable
   + *




reply via email to

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