As title. I want to detect the case when there is only one split in the current tab.
echo tabpagewinnr(tabpagenr(), '$')
tabpagenr() gives you the number of the current tab page.
'$' as the second param to
tabpagewinnr() and that function will return the number of windows contained in the specified tab page.
So you can test for single window (no splits) with something like:
if tabpagewinnr(tabpagenr(), '$') == 1 " do something endif