From c4b0dffcfad3b8998d175460d79b9a472e7542bf Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 22 Mar 2016 13:14:25 -0500 Subject: [PATCH] try to help the search window to have the right size in the case that the font size has changed since it was last open (this doesn't seem to be a problem with only one tab and may actually be a bug in the way editor canvases with set-line-count enabled handle font size changes, I'm not sure, but this seems to fix a fairly annoying behavior I run into) --- gui-lib/framework/private/frame.rkt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui-lib/framework/private/frame.rkt b/gui-lib/framework/private/frame.rkt index da43f874..98153732 100644 --- a/gui-lib/framework/private/frame.rkt +++ b/gui-lib/framework/private/frame.rkt @@ -2419,6 +2419,10 @@ (when focus? (send find-edit set-position 0 (send find-edit last-position)) (send (send find-edit get-canvas) focus)) + (let ([c (send find-edit get-canvas)]) + (when (and c (send c get-line-count)) + ;; try to update the canvas so that the font size is correctly accounted for + (send c set-editor (send c get-editor)))) (send find-edit end-edit-sequence))) (define/public (unhide-search-and-toggle-focus #:new-search-string-from-selection? [new-search-string-from-selection? #f])