Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sort tab completion properly with more than 9 tabs.
`ListCategory` sorts its completion on the first column. The first column for the tab completion (used by :buffer and :tab-take) is "win_id/tab_idx". But the tab index wasn't zero padded on the left so if you had eleven tabs your list would be sorted like: 0/1 0/10 0/11 0/2 ... Which didn't match the order in the tab bar. Now it will. This changes the shape of a string which callers operate on but they also all use `int()` and leading zeroes don't change the output of that. If you have more than nine windows you will get the catagories in the same jumbled order. Is that something we should worry about? `log10` throws a ValueError if you pass 0 to it, hence the defensive coding around `tabbed_browser.widget.count()`, I'm not sure if it could ever be 0 here but I wouldn't be surprised.
- Loading branch information