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)
This commit is contained in:
Robby Findler 2016-03-22 13:14:25 -05:00
parent 3da682ebe1
commit c4b0dffcfa

View File

@ -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])