[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * info/session.c (info_handle_pointer): When goin
From: |
Gavin D. Smith |
Subject: |
branch master updated: * info/session.c (info_handle_pointer): When going Up, look for the current node in the Up nodes menu and position the cursor there. * NEWS: mention this |
Date: |
Fri, 04 Aug 2023 06:12:25 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 8bbd5ee61c * info/session.c (info_handle_pointer): When going Up, look
for the current node in the Up nodes menu and position the cursor there. *
NEWS: mention this
8bbd5ee61c is described below
commit 8bbd5ee61cd6118cdc9eff7b1db9fe7d4ca84a97
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Fri Aug 4 11:12:17 2023 +0100
* info/session.c (info_handle_pointer): When going Up, look
for the current node in the Up nodes menu and position the
cursor there.
* NEWS: mention this
---
ChangeLog | 7 +++++++
NEWS | 1 +
info/session.c | 20 +++++++++-----------
3 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 195ba6a5df..40b605381c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-08-04 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * info/session.c (info_handle_pointer): When going Up, look
+ for the current node in the Up nodes menu and position the
+ cursor there.
+ * NEWS: mention this
+
2023-08-03 Gavin Smith <gavinsmith0123@gmail.com>
* doc/texinfo.texi: Use trailing comma before 'or' more
diff --git a/NEWS b/NEWS
index bd36392042..7a711cf76a 100644
--- a/NEWS
+++ b/NEWS
@@ -73,6 +73,7 @@ See the manual for detailed information.
. microtype is off by default, for speed
* info
+ . when going Up, position cursor on menu entry for current node
. do not use "/index" as a possible file extension for Info files
diff --git a/info/session.c b/info/session.c
index 499857ef13..346da4e591 100644
--- a/info/session.c
+++ b/info/session.c
@@ -2952,23 +2952,21 @@ info_handle_pointer (char *label, WINDOW *window)
return 0;
}
- /* If we are going up, set the cursor position to the last place it
- was in the node. */
+ /* If we are going up, look for the current node in the menu. */
if (strcmp (label, "Up") == 0)
{
+ REFERENCE **r;
int i;
- for (i = window->hist_index - 1; i >= 0; i--)
+ for (r = node->references; (*r); r++)
{
- NODE *p = window->hist[i]->node;
-
- if (p->fullpath && !strcmp (p->fullpath, node->fullpath)
- && p->nodename && !strcmp (p->nodename, node->nodename))
- break;
+ if ((*r)->type == REFERENCE_MENU_ITEM
+ && strcmp ((*r)->nodename, window->node->nodename) == 0)
+ {
+ node->display_pos = (*r)->start;
+ break;
+ }
}
-
- if (i >= 0)
- node->display_pos = window->hist[i]->point;
}
info_set_node_of_window (window, node);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * info/session.c (info_handle_pointer): When going Up, look for the current node in the Up nodes menu and position the cursor there. * NEWS: mention this,
Gavin D. Smith <=