[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5714] forward_move_node_structure
From: |
Gavin D. Smith |
Subject: |
[5714] forward_move_node_structure |
Date: |
Tue, 22 Jul 2014 09:52:20 +0000 |
Revision: 5714
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5714
Author: gavin
Date: 2014-07-22 09:52:19 +0000 (Tue, 22 Jul 2014)
Log Message:
-----------
forward_move_node_structure
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/session.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-07-21 22:14:13 UTC (rev 5713)
+++ trunk/ChangeLog 2014-07-22 09:52:19 UTC (rev 5714)
@@ -1,3 +1,8 @@
+2014-07-22 Gavin Smith <address@hidden>
+
+ * info/session.c (forward_move_node_structure): Get first menu
+ entry properly.
+
2014-07-21 Gavin Smith <address@hidden>
* info/man.c (get_manpage_contents): Try getting manpage with -a
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-07-21 22:14:13 UTC (rev 5713)
+++ trunk/info/session.c 2014-07-22 09:52:19 UTC (rev 5714)
@@ -1904,6 +1904,8 @@
{
if (window->node->up)
{
+ REFERENCE *entry;
+
if (!info_handle_pointer ("Up", window))
return 1;
@@ -1915,18 +1917,10 @@
/* If this node's first menu item is the same as this node's
Next pointer, keep backing up. */
- {
- REFERENCE **menu;
+ entry = select_menu_digit (window, '1');
+ if (entry && !strcmp (window->node->next, entry->nodename))
+ continue;
- /* FIXME: this is wrong: what if there is a link
- before the menu? */
- menu = window->node->references;
- if (menu &&
- (strcmp
- (menu[0]->nodename, window->node->next) == 0))
- continue;
- }
-
/* This node has a "Next" pointer, and it is not the
same as the first menu item found in this node. */
info_handle_pointer ("Next", window);
@@ -2158,7 +2152,8 @@
info_menu_digit (window, 1, '0');
}
-/* Return menu entry */
+/* Return menu entry indexed by KEY, where '1' is the first menu item, '2' is
+ the second, etc., and '0' is the last. Return value should not be freed. */
static REFERENCE *
select_menu_digit (WINDOW *window, unsigned char key)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5714] forward_move_node_structure,
Gavin D. Smith <=