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
|
// keep track of the highlighted index in the key label strip
|
||||||
let firstVisibleRow = tableView.row(at: scrollView.documentVisibleRect.origin)
|
let firstVisibleRow = tableView.row(at: scrollView.documentVisibleRect.origin)
|
||||||
// firstVisibleRow cannot be larger than selectedRow.
|
// firstVisibleRow cannot be larger than selectedRow.
|
||||||
if firstVisibleRow > selectedRow {
|
if selectedRow >= firstVisibleRow {
|
||||||
return
|
keyLabelStripView.highlightedIndex = UInt(selectedRow - firstVisibleRow)
|
||||||
|
} else {
|
||||||
|
keyLabelStripView.highlightedIndex = UInt.max
|
||||||
}
|
}
|
||||||
keyLabelStripView.highlightedIndex = UInt(selectedRow - firstVisibleRow)
|
|
||||||
keyLabelStripView.setNeedsDisplay(keyLabelStripView.frame)
|
keyLabelStripView.setNeedsDisplay(keyLabelStripView.frame)
|
||||||
|
|
||||||
// fix a subtle OS X "bug" that, since we force the scroller to appear,
|
// fix a subtle OS X "bug" that, since we force the scroller to appear,
|
||||||
|
|
Loading…
Reference in New Issue