forked from tslocum/cview
Fix List dividers allowing selection
This commit is contained in:
parent
2877b77c18
commit
2fe1085168
|
@ -5,6 +5,7 @@ v1.5.1 (WIP)
|
|||
- Add TableCell.SetBytes, TableCell.GetBytes and TableCell.GetText
|
||||
- Fix List.Transform not calling handler set via SetChangedFunc
|
||||
- Fix WordWrap bounds out of range
|
||||
- Fix List dividers allowing selection
|
||||
- Allow modification of scroll bar render text
|
||||
- Allow scrolling List horizontally
|
||||
- Optimize TextView (writing is 90% faster, drawing is 50% faster)
|
||||
|
|
7
list.go
7
list.go
|
@ -772,7 +772,7 @@ func (l *List) transform(tr Transformation) {
|
|||
}
|
||||
|
||||
item := l.items[l.currentItem]
|
||||
if item.enabled {
|
||||
if item.enabled && (item.shortcut > 0 || len(item.mainText) > 0 || len(item.secondaryText) > 0) {
|
||||
break
|
||||
}
|
||||
|
||||
|
@ -846,10 +846,11 @@ func (l *List) updateOffset() {
|
|||
addWidth = 1
|
||||
}
|
||||
|
||||
if l.columnOffset > (maxWidth-l.innerWidth)+addWidth {
|
||||
l.columnOffset = (maxWidth - l.innerWidth) + addWidth
|
||||
}
|
||||
if l.columnOffset < 0 {
|
||||
l.columnOffset = 0
|
||||
} else if l.columnOffset > (maxWidth-l.innerWidth)+addWidth {
|
||||
l.columnOffset = (maxWidth - l.innerWidth) + addWidth
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue