wiki-tui: [BUG] Clicking in the table of contents doesn't update the article view sometimes
Describe the bug When clicking on some parts of the table of contents on the right, the view sometimes doesn’t go to that section. I don’t see when it works and when it doesn’t, but it seems to be pretty random.
To Reproduce
- Open a page (I was testing with the Linux Kernel page)
- Click on the table of contents
- It doesn’t scroll in the article view sometimes
Expected behavior The view should follow the clicked section on the table of contents.
Additional context Latest version, installed with Cargo (There should probably be a section in the template for this information 😃)
Checklist
- checked other issues for the same bug
- read
CONTRIBUTING.md
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 26 (26 by maintainers)
Commits related to this issue
- Update Bug Report Issue Template (#40) As pointed out in #39 a section for general information (like version and installation method) is missing in the current bug report issue template. This adds th... — committed to Builditluc/wiki-tui by Builditluc 2 years ago
- Fix Header Selection (#41) This fixes the bug described in #39 and adds mouse support to the article view — committed to Builditluc/wiki-tui by Builditluc 2 years ago
I’ve linked the PR with the patch to this issue so it’ll be closed once merged.
Thank you for your bug report and help in finding the issue!
Thanks to you I know what happens, with the keybindings thing you can remap the keys via the configuration file. The problem here is: If you don’t remap the key it creates an infinite event loop and this is why it throws a “stack overflow” error
I’ve uploaded a patch that should fix the issue. Until the next version is released, you can use it by installing wiki-tui from the git repo.
Does this patch fix the issue for you?
Hey @ThomasFrans! Thank you for your bug report!
Upon further testing (I also used the Linux Kernel page) it seems ~that if the first item in the list is selected~ if you are at the beginning of the article, you can select every other item and it jumps to that section in the article.
Selecting an item that is higher than the currently selected item also works. The thing that is strange here is that the only thing that doesn’t work is selecting an item that is below the current item when you aren’t at the top of the page.
I’ll work on fixing this as soon as possible