Fixes an underlying issue in the tableViewSelectionDidChange method.
This commit is contained in:
parent
7e2d3df5ba
commit
95f88ce802
|
@ -310,10 +310,12 @@ extension VerticalCandidateController: NSTableViewDataSource, NSTableViewDelegat
|
|||
// keep track of the highlighted index in the key label strip
|
||||
let firstVisibleRow = tableView.row(at: scrollView.documentVisibleRect.origin)
|
||||
// firstVisibleRow cannot be larger than selectedRow.
|
||||
if firstVisibleRow > selectedRow {
|
||||
return
|
||||
}
|
||||
if selectedRow >= firstVisibleRow {
|
||||
keyLabelStripView.highlightedIndex = UInt(selectedRow - firstVisibleRow)
|
||||
} else {
|
||||
keyLabelStripView.highlightedIndex = UInt.max
|
||||
}
|
||||
|
||||
keyLabelStripView.setNeedsDisplay(keyLabelStripView.frame)
|
||||
|
||||
// fix a subtle OS X "bug" that, since we force the scroller to appear,
|
||||
|
|
Loading…
Reference in New Issue