BUG: Fix categorical formatter not folding the output when it exceeds display width
- [x] closes #12066
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Let me know if further refactoring is required.