I can't explain the bug but it's a bug
:
To reproduce:
dialog test {
title "Test"
size -1 -1 104 52
option dbu
tab "Tab 1", 1, 0 0 99 47
button "Button", 3, 28 26 37 12, tab 1
tab "Tab 2", 2
button "Button", 4, 30 26 37 12, tab 2
}
/dialog -md test test
If you have the focus on tab 1:
/echo $did(test,1).prev gives -5899
/echo $did(test,1).next gives -3
/echo $did(test,2).prev gives -3
/echo $did(test,2).next gives -5899
If you have the focus on tab 2:
/echo $did(test,1).prev gives 4
/echo $did(test,1).next gives -5899
/echo $did(test,2).prev gives -5899
/echo $did(test,2).next gives 4