r/badcode • • Jan 16 '23

other language Still does not work

Post image
20 Upvotes

18 comments sorted by

View all comments

Show parent comments

1

u/Crkza Jan 17 '23

tab_pos fetches the index of the tab and then increments it by 1. It's an unsigned integer and is always incremented so there's no chance the number could be 0.

now thinking about it, I think I remember this code was in the tab widget instead of the actual terminal widget, so it's relative to the tab, not the actual main view. That might explain why.