It's possible for the cursor to be "further right" than the right margin

This commit is contained in:
Tony Garnock-Jones 2014-12-28 09:25:08 -05:00
parent 0fb9fcc616
commit b6bbe560f3
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@
(define start-column (tty-cursor-column tty)) (define start-column (tty-cursor-column tty))
(define pen (screen-pen (tty-pending-screen tty))) (define pen (screen-pen (tty-pending-screen tty)))
(tty-set-pen! tty tty-default-pen) (tty-set-pen! tty tty-default-pen)
(for ((i (- (tty-columns tty) (tty-cursor-column tty)))) (putc tty 'empty)) (for ((i (max 0 (- (tty-columns tty) (tty-cursor-column tty))))) (putc tty 'empty))
(tty-set-pen! tty pen) (tty-set-pen! tty pen)
(tty-goto tty (tty-cursor-row tty) start-column) (tty-goto tty (tty-cursor-row tty) start-column)
tty) tty)