Fix navigation not working when the active verse has no text - #1353
Merged
karlkleinpaste merged 1 commit intoJul 29, 2026
Merged
Conversation
Contributor
Author
|
@karlkleinpaste,, I don't know if you remember that bug with 1 Kings 3:1 in the LXX. That's what this is about—it works with this PR. To get around the problem, I used to edit the OSIS files before conversion, but now that's no longer necessary. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Xiphos would not work navigation (dropdown menus, spin arrows, and the lookup entry) whenever the target verse had no text in the active module. The display stayed stuck on the previously shown reference, nothing updated, and no error was shown to the user.
Root cause
In
on_entry_activate()(src/gtk/navbar_versekey.c), a key was treated as invalid ifmain_get_raw_text()returned fewer than 2 characters:This conflates two different things:
main_get_valid_key()/main_is_Bible_key())A reference can be perfectly valid while having no text (sparse/partial module, a verse intentionally left blank, etc.). BibleTime handles this correctly and simply shows an empty page. Xiphos, instead, aborted navigation entirely and got stuck.
Reproduction
Fix
Removed the text-emptiness check. Key validity is now determined solely by
main_get_valid_key()/main_is_Bible_key(), consistent with the rest of the function.Testing
Manually verified: blanking verse 1 of a chapter previously froze navigation to that chapter entirely. After this fix, navigation works normally and an empty verse is displayed as expected, without affecting navigation to subsequent verses/chapters.