mirror of
https://github.com/rivo/tview.git
synced 2025-04-26 13:49:06 +08:00
Fix panic when clicking spaces after slide page items.
This commit is contained in:
parent
c766eefb38
commit
ab1a0c7324
@ -55,6 +55,10 @@ func main() {
|
|||||||
SetRegions(true).
|
SetRegions(true).
|
||||||
SetWrap(false).
|
SetWrap(false).
|
||||||
SetHighlightedFunc(func(added, removed, remaining []string) {
|
SetHighlightedFunc(func(added, removed, remaining []string) {
|
||||||
|
if len(added) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
pages.SwitchToPage(added[0])
|
pages.SwitchToPage(added[0])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user