Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Chapternumber should become visible when "cursor" is on them. #5

Closed
jajpater opened this issue Feb 10, 2021 · 3 comments
Closed

Chapternumber should become visible when "cursor" is on them. #5

jajpater opened this issue Feb 10, 2021 · 3 comments

Comments

@jajpater
Copy link
Contributor

When a Biblebook has more chapters than numbers visible on the screen you can navigate to the chapternumber but the chapternumber will not become visible. For instance the book of Genesis has 50 chapters only numbers 1 to 47 are visible for me, I can reach 50 but I can't see the chapter number or the cursor.

@jajpater
Copy link
Contributor Author

asciicast

@rwev
Copy link
Owner

rwev commented Feb 11, 2021

Thanks for reporting this; I just confirmed the bug locally.

@rwev rwev closed this as completed in d5ed753 Feb 11, 2021
@rwev
Copy link
Owner

rwev commented Feb 11, 2021

Fixed. Unfortunately as a side effect, I had to remove the G (jump to end) vim-style keybinding because it isn't compatible with how the displayed item boundaries are managed.

Right now, the beginning and end boundaries should always have a difference between them equal to the height of the viewport, curses.LINES - 2, Otherwise, changing the book selection to one with more chapters would result in truncation.

Jumping to the end of the list and showing the last curses.LINES - 2 items may result in the beginning index becoming negative, depending on the length of the list, which would break the ListWindow.draw routine and further boundary changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants