Fix bug where pattern header was sometimes not redrawn #404
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.
In 0.5.0 and before, pressing Shift+Tab repeatedly until you reach FM 2 will fail to redraw the header, because
oldLeftTrackIdx
was erroneously declared abool
.In builds since accb5ac (accb5ac#diff-97d96a2c599e40b88ae7e016d1b61a16bbb5cb81d4ef24f08c83fa5e8f2307fb) (more recent than 0.5.0), placing the cursor in the leftmost column, then pressing Shift+Tab to jump to the right an even number of columns, will fail to redraw the header, and 1 of every 2 subsequent Shift+Tab presses will fail to redraw. This is due to the bizarre
static_cast<bool>(leftTrackVisIdx_&1) != oldLeftTrackIdx
comparison.This fixes both problems by declaring
oldLeftTrackIdx
as anint
, and comparing it toleftTrackVisIdx_
directly.