note to self

dev-srcloc
Matthew Butterick 8 years ago
parent 6b30895974
commit ee71ebdc50

@ -4,6 +4,9 @@
(define open-braces #f) (define open-braces #f)
(define indent-width 2) (define indent-width 2)
;; todo: update indenter to work from an arbitrary line in the middle
;; not just top to bottom.
(define (indenter drr-editor start-pos) (define (indenter drr-editor start-pos)
(when (zero? start-pos) (set! open-braces 0)) (when (zero? start-pos) (set! open-braces 0))
(define first-pos-in-this-line (define first-pos-in-this-line

@ -7,11 +7,11 @@
[bitmap (make-object bitmap% 16 16)] [bitmap (make-object bitmap% 16 16)]
[callback (λ (drr-frame) [callback (λ (drr-frame)
(define drr-editor (send drr-frame get-definitions-text)) (define drr-editor (send drr-frame get-definitions-text))
(define block-string "@$ $@")
(send drr-editor begin-edit-sequence) (send drr-editor begin-edit-sequence)
(send drr-editor insert "@$ $@") (send drr-editor insert block-string)
(send drr-editor end-edit-sequence) (send drr-editor end-edit-sequence)
(define pos (send drr-editor get-end-position)) (define pos (send drr-editor get-end-position))
(send drr-editor set-position (- pos 3)) (send drr-editor set-position (- pos (/ (string-length block-string) 2))))]
)]
[number 98]) [number 98])
(list label bitmap callback number)))) (list label bitmap callback number))))
Loading…
Cancel
Save