inertial indenting

pull/196/head
Matthew Butterick 5 years ago
parent f016f14e99
commit 8fb1df0daa

@ -95,7 +95,17 @@
(match (dynamic-require 'pollen/private/drracket-buttons 'make-drracket-buttons (λ () #false))
[(? procedure? make-buttons) (make-buttons my-command-char)])])]
[(drracket:indentation)
(dynamic-require 'scribble/private/indentation 'determine-spaces)]
(λ (text pos)
(define line-idx (send text position-line pos))
(define line-start-pos (send text line-start-position line-idx))
(define line-end-pos (send text line-end-position line-idx))
(define first-vis-pos
(or
(for/first ([pos (in-range line-start-pos line-end-pos)]
#:unless (char-blank? (send text get-character pos)))
pos)
line-start-pos))
(- first-vis-pos line-start-pos))]
[(drracket:default-filters)
;; derive this from `module-suffixes` entry in main info.rkt file
(define module-suffixes ((get-info/full info-dir) 'module-suffixes))

@ -1 +1 @@
1551468549
1552249575

Loading…
Cancel
Save