Skip to content

Restore full verse-range expansion in BackEnd::parse_verse_list() - #1377

Merged
karlkleinpaste merged 1 commit into
crosswire:masterfrom
LAfricain:fix-range-verse-list
Aug 15, 2026
Merged

Restore full verse-range expansion in BackEnd::parse_verse_list()#1377
karlkleinpaste merged 1 commit into
crosswire:masterfrom
LAfricain:fix-range-verse-list

Conversation

@LAfricain

Copy link
Copy Markdown
Contributor

A previous fix (in the tag-color-highlighting branch) switched this
function's iteration from a popError()-driven while(vs++) loop to
indexed access via vs.getElement(i), to stop one malformed fragment
in a multi-reference list from truncating everything after it.

That change had a side effect: the old vs++ iteration transparently
expanded hyphenated verse ranges (e.g. "Jer 3:6-11") into one entry
per verse, but getElement(i) returns each range as a single,
unexpanded entry whose getText() only reports the start verse.
Every caller of parse_verse_list() -- the verse-list popup, the
sidebar cross-reference list, and bookmark tag-color highlighting --
was silently dropping the rest of any such range.

Empirically, for a ListKey element that represents a range,
getUpperBound() (and getLowerBound(), which mirrors it here) return
the END of the range; for a plain single verse they are equal to the
element itself. Detect that difference and, when present, walk every
verse from the element (start) through the upper bound (end) via
increment(), adding each individually -- restoring the original
full-range expansion behavior for every caller of this function.

@karlkleinpaste
karlkleinpaste merged commit 9ef0b9b into crosswire:master Aug 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants