texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Gavin D. Smith
Date: Wed, 30 Nov 2022 13:36:42 -0500 (EST)

branch: old/qt-info
commit cdc4e0c4048d95e655b3b785d25eae942ff99e48
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Apr 13 22:41:33 2019 +0100

    Fix direction after index search.
    
    * js/info.js (Pages.prototype.render):
    After changing the node, remove any anchor from state.current.
    This makes 'n', 'p' work correctly after an index lookup, and
    also makes the sidebar ToC be updated correctly (without being
    fully expanded and no node highlighted).
---
 ChangeLog               | 10 ++++++++++
 js/docbrowser/qtinfo.js |  1 -
 js/info.js              |  3 +++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index f50dded49b..b0f4e108ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2019-04-13  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Fix direction after index search.
+
+       * js/info.js (Pages.prototype.render):
+       After changing the node, remove any anchor from state.current.
+       This makes 'n', 'p' work correctly after an index lookup, and
+       also makes the sidebar ToC be updated correctly (without being
+       fully expanded and no node highlighted).
+
 2019-04-13  Gavin Smith  <gavinsmith0123@gmail.com>
 
        Defer calling fix_links.
diff --git a/js/docbrowser/qtinfo.js b/js/docbrowser/qtinfo.js
index 63c3ee37ff..4dc4fa40f2 100644
--- a/js/docbrowser/qtinfo.js
+++ b/js/docbrowser/qtinfo.js
@@ -73,7 +73,6 @@ function wc_init()
                in 'linkid' format doesn't change it. */
 
             var linkid = with_sidebar_query (anchor)
-            console.log("LINKID "+linkid);
             store.dispatch (actions.set_current_url (href_hash (linkid)));
           });
 
diff --git a/js/info.js b/js/info.js
index c20d7649a6..2f8e3236f8 100644
--- a/js/info.js
+++ b/js/info.js
@@ -811,6 +811,9 @@ var user_config = window["INFO_CONFIG"];
               post_message (old.pageid, msg);
             }
           var div = resolve_page (state.current, true);
+          /* Remove any anchor. */
+          var link = linkid_split (state.current);
+          state.current = link.pageid;
           update_history (state.current, state.history);
           this.prev_id = state.current;
           this.prev_div = div;



reply via email to

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