From 0a94dcb73351d5a77cd56af7c7fd9c54a56f23b7 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sat, 15 Feb 2020 10:48:12 -0800 Subject: [PATCH] but not wrap --- quad/quadwriter/line.rkt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/quad/quadwriter/line.rkt b/quad/quadwriter/line.rkt index 11463568..339cfc6f 100644 --- a/quad/quadwriter/line.rkt +++ b/quad/quadwriter/line.rkt @@ -291,6 +291,15 @@ (quad-ref pq :inset-right 0)) permitted-justify-overfill) debug + + ;; during wrap, anchored qs are treated as having distance 0 + ;; so they can staty in right place, so that relative queries will work. + ;; but they won't affect where lines break + #:distance (λ (q last-dist wrap-qs) + (+ last-dist (cond + [(quad-ref q :anchor-parent) 0] + [(printable? q) (distance q)] + [else 0]))) #:nicely (match (or (current-line-wrap) (quad-ref pq :line-wrap)) [(or "best" "kp") #true] [_ #false])