...
original commit: 29563d2aad92b4803bf9ed69da26bc585d03ff9c
This commit is contained in:
parent
6a8eb44022
commit
8d3e8b0091
|
@ -71,10 +71,12 @@
|
|||
(override
|
||||
[can-close?
|
||||
(lambda ()
|
||||
(and (super-can-close?)
|
||||
(send (group:get-the-frame-group)
|
||||
can-remove-frame?
|
||||
this)))]
|
||||
(let ([super (super-can-close?)]
|
||||
[group
|
||||
(send (group:get-the-frame-group)
|
||||
can-remove-frame?
|
||||
this)])
|
||||
(and super group)))]
|
||||
[on-close
|
||||
(lambda ()
|
||||
(super-on-close)
|
||||
|
@ -85,7 +87,11 @@
|
|||
(lambda (on?)
|
||||
(super-on-focus on?)
|
||||
(when on?
|
||||
(send (group:get-the-frame-group) set-active-frame this)))])
|
||||
(send (group:get-the-frame-group) set-active-frame this)))]
|
||||
|
||||
[on-drop-file
|
||||
(lambda (filename)
|
||||
(handler:edit-file filename))])
|
||||
|
||||
(inherit show)
|
||||
(public
|
||||
|
@ -100,6 +106,7 @@
|
|||
(on-close)
|
||||
(show #f)))])
|
||||
|
||||
(inherit accept-drop-files)
|
||||
(sequence
|
||||
(let ([mdi-parent (send (group:get-the-frame-group) get-mdi-parent)])
|
||||
(super-init label
|
||||
|
@ -110,6 +117,8 @@
|
|||
[mdi-parent (cons 'mdi-child style)]
|
||||
[else style])))
|
||||
|
||||
(accept-drop-files #t)
|
||||
|
||||
(make-object menu% "Windows" (make-object (get-menu-bar%) this))
|
||||
(reorder-menus this)
|
||||
(send (group:get-the-frame-group) insert-frame this))
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
f frames
|
||||
(lambda (f fr) (eq? f (frame-frame fr))))])
|
||||
(if (null? new-frames)
|
||||
(empty-test)
|
||||
(empty-test)
|
||||
#t)))]
|
||||
[remove-frame
|
||||
(opt-lambda (f)
|
||||
|
|
|
@ -395,8 +395,7 @@
|
|||
[visual-offset
|
||||
(lambda (pos)
|
||||
(let loop ([p (sub1 pos)])
|
||||
(if (= p -1)
|
||||
0
|
||||
(if p
|
||||
(let ([c (get-character p)])
|
||||
(cond
|
||||
[(char=? c #\null) 0]
|
||||
|
@ -404,7 +403,8 @@
|
|||
(let ([o (loop (sub1 p))])
|
||||
(+ o (- 8 (modulo o 8))))]
|
||||
[(char=? c #\newline) 0]
|
||||
[else (add1 (loop (sub1 p)))])))))]
|
||||
[else (add1 (loop (sub1 p)))]))
|
||||
0)))]
|
||||
[do-indent
|
||||
(lambda (amt)
|
||||
(let* ([pos-start end]
|
||||
|
@ -645,11 +645,17 @@
|
|||
exp-pos))])
|
||||
|
||||
(if (and exp-pos (> exp-pos 0))
|
||||
(let ([pos (apply max
|
||||
(map paren-pos (scheme-paren:get-paren-pairs)))])
|
||||
(if (= pos -1) ;; all finds failed
|
||||
(let ([poss (let loop ([parens (scheme-paren:get-paren-pairs)])
|
||||
(cond
|
||||
[(null? parens) null]
|
||||
[else
|
||||
(let ([pos (paren-pos (car parens))])
|
||||
(if pos
|
||||
(cons pos (loop (cdr parens)))
|
||||
(loop (cdr parens))))]))])
|
||||
(if (null? poss) ;; all finds failed
|
||||
#f
|
||||
(- pos 1))) ;; subtract one to move outside the paren
|
||||
(- (apply max poss) 1))) ;; subtract one to move outside the paren
|
||||
#f)))]
|
||||
[up-sexp
|
||||
(lambda (start-pos)
|
||||
|
|
Loading…
Reference in New Issue
Block a user