From 9d395fc085fe5ba03a6a7cbdc2bdc7dc33e4a5a7 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 9 Jun 2000 20:25:56 +0000 Subject: [PATCH] ... original commit: 71e485ad42014a0d110aca8475a3f97a8d3d5b09 --- collects/framework/canvas.ss | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/collects/framework/canvas.ss b/collects/framework/canvas.ss index 075e967b..5e45d386 100644 --- a/collects/framework/canvas.ss +++ b/collects/framework/canvas.ss @@ -91,15 +91,15 @@ (if width? - (let ([snip-width (- (unbox width) - (unbox left-edge-box) - (unbox leftm) - (unbox rightm) - + (let ([snip-width (max 0 (- (unbox width) + (unbox left-edge-box) + (unbox leftm) + (unbox rightm) + ;; this two is the space that ;; the caret needs at the right of ;; a buffer. - 2)]) + 2))]) (send* s (set-min-width snip-width) (set-max-width snip-width)) @@ -108,10 +108,10 @@ (if (send snip-media auto-wrap) snip-width 0)))) - (let ([snip-height (- (unbox height) - (unbox top-edge-box) - (unbox topm) - (unbox bottomm))]) + (let ([snip-height (max 0 (- (unbox height) + (unbox top-edge-box) + (unbox topm) + (unbox bottomm)))]) (send* s (set-min-height snip-height) (set-max-height snip-height)))))))))))])