Improve readability of src/document/printer.js
- Add MAX_CURSOR_COUNT constant instead of magic number 2
- Rename 'rem' to 'remainingWidth' for better clarity
- All tests pass, no behavior changes
Co-authored-by: fisker <172584+fisker@users.noreply.github.com>