|
75 | 75 |
|
76 | 76 | (define/private (reset-entire-overview) |
77 | 77 | (define h (last-paragraph)) |
| 78 | + (define previous-bmp-width bmp-width) |
78 | 79 | (update-bmp-width) |
79 | 80 | (define to-create-h (+ h 20)) |
80 | 81 | (unless (and primary-bmp |
|
83 | 84 | (set! primary-bmp (unsafe:make-bitmap bmp-width to-create-h)) |
84 | 85 | (set! secondary-bmp (unsafe:make-bitmap bmp-width to-create-h)) |
85 | 86 | (set! known-blank 0)) |
| 87 | + (when (> previous-bmp-width bmp-width) |
| 88 | + (invalidate-entire-overview-region |
| 89 | + #t |
| 90 | + #:extra-left-width |
| 91 | + (- previous-bmp-width bmp-width))) |
86 | 92 | (union-invalid 0 h) |
87 | 93 | (maybe-queue-do-a-little-work?)) |
88 | 94 |
|
|
266 | 272 | ;; invalidates only the newly exposed region |
267 | 273 | (invalidate-entire-overview-region #f))) |
268 | 274 |
|
269 | | - (define/private (invalidate-entire-overview-region just-union? #:use-this-width [use-this-width #f]) |
| 275 | + (define/private (invalidate-entire-overview-region just-union? #:extra-left-width [extra-left-width 0]) |
270 | 276 | (define-values (view-height |
271 | 277 | bitmap-first-visible-paragraph |
272 | 278 | top-paragraph |
273 | 279 | bot-paragraph |
274 | 280 | bitmap-x-coordinate |
275 | 281 | bitmap-y-coordinate) |
276 | 282 | (get-bitmap-placement-info)) |
277 | | - (define x (- bitmap-x-coordinate extra-blue-parts-margin)) |
278 | | - (define w (+ (or use-this-width bmp-width) extra-blue-parts-margin)) |
| 283 | + (define x (- bitmap-x-coordinate extra-blue-parts-margin extra-left-width)) |
| 284 | + (define w (+ bmp-width extra-left-width extra-blue-parts-margin)) |
279 | 285 | (cond |
280 | 286 | [just-union? |
281 | 287 | (union-region-to-invalidate x |
|
508 | 514 | ;; if the bitmap gets narrower, |
509 | 515 | ;; the invalidate-entire-overview-region |
510 | 516 | ;; below won't invalidate a big enough region |
511 | | - (invalidate-entire-overview-region #t #:use-this-width previous-bmp-width)) |
| 517 | + (invalidate-entire-overview-region #t #:extra-left-width (- previous-bmp-width bmp-width))) |
512 | 518 | (not (= previous-bmp-width bmp-width))] |
513 | 519 | [else #f])) |
514 | 520 | (when bmp-width-changed? |
|
0 commit comments