From b6bbe560f3fb5b746f01154d55b6047710ccec0f Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sun, 28 Dec 2014 09:25:08 -0500 Subject: [PATCH] It's possible for the cursor to be "further right" than the right margin --- rmacs/display.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmacs/display.rkt b/rmacs/display.rkt index 8e04930..042d408 100644 --- a/rmacs/display.rkt +++ b/rmacs/display.rkt @@ -253,7 +253,7 @@ (define start-column (tty-cursor-column tty)) (define pen (screen-pen (tty-pending-screen tty))) (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-goto tty (tty-cursor-row tty) start-column) tty)