bug fixes from random testing
svn: r18602
This commit is contained in:
parent
6edf2015c7
commit
fb37601b55
|
@ -264,6 +264,7 @@ Matthew
|
||||||
unlocked)
|
unlocked)
|
||||||
|
|
||||||
(get-text [() (x) (x y) (x y z) (x y z p)] unlocked)
|
(get-text [() (x) (x y) (x y z) (x y z p)] unlocked)
|
||||||
|
(get-flattened-text [()] unlocked)
|
||||||
(get-character [(start)] unlocked)
|
(get-character [(start)] unlocked)
|
||||||
(find-wordbreak [(start end reason)] unlocked)
|
(find-wordbreak [(start end reason)] unlocked)
|
||||||
(save-file [() (filename) (filename format) (filename format show-errors?)] unlocked)
|
(save-file [() (filename) (filename format) (filename format show-errors?)] unlocked)
|
||||||
|
@ -273,7 +274,10 @@ Matthew
|
||||||
(num-scroll-lines [()] unlocked)
|
(num-scroll-lines [()] unlocked)
|
||||||
(find-scroll-line [(location)] unlocked)
|
(find-scroll-line [(location)] unlocked)
|
||||||
(style-has-changed [(style)] unlocked)
|
(style-has-changed [(style)] unlocked)
|
||||||
|
|
||||||
|
(set-paragraph-margins [(para fl l r)] unlocked)
|
||||||
|
(set-paragraph-alignment [(para align)] unlocked)
|
||||||
|
|
||||||
(change-style [(x) (x y) (x y z) (x y z w)] unlocked)
|
(change-style [(x) (x y) (x y z) (x y z w)] unlocked)
|
||||||
(insert [(x) (x y) (x y z) (x y z p) (x y z p q)] unlocked)
|
(insert [(x) (x y) (x y z) (x y z p) (x y z p q)] unlocked)
|
||||||
(delete [() (start) (start end) (start end scroll-ok?)] unlocked)
|
(delete [() (start) (start end) (start end scroll-ok?)] unlocked)
|
||||||
|
@ -306,6 +310,7 @@ Matthew
|
||||||
write-lock)
|
write-lock)
|
||||||
|
|
||||||
(get-text [() (x) (x y) (x y z) (x y z p)] write-lock)
|
(get-text [() (x) (x y) (x y z) (x y z p)] write-lock)
|
||||||
|
(get-flattened-text [()] write-lock)
|
||||||
(get-character [(start)] write-lock)
|
(get-character [(start)] write-lock)
|
||||||
(find-wordbreak [(start end reason)] write-lock)
|
(find-wordbreak [(start end reason)] write-lock)
|
||||||
(save-file [() (filename) (filename format) (filename format show-errors?)] write-lock)
|
(save-file [() (filename) (filename format) (filename format show-errors?)] write-lock)
|
||||||
|
@ -321,6 +326,7 @@ Matthew
|
||||||
(not (locked-for-read?)))
|
(not (locked-for-read?)))
|
||||||
|
|
||||||
(get-text [() (x) (x y) (x y z) (x y z p)] flow-lock)
|
(get-text [() (x) (x y) (x y z) (x y z p)] flow-lock)
|
||||||
|
(get-flattened-text [()] flow-lock)
|
||||||
(get-character [(start)] flow-lock)
|
(get-character [(start)] flow-lock)
|
||||||
(find-wordbreak [(start end reason)] flow-lock)
|
(find-wordbreak [(start end reason)] flow-lock)
|
||||||
(save-file [() (filename) (filename format) (filename format show-errors?)] flow-lock)
|
(save-file [() (filename) (filename format) (filename format show-errors?)] flow-lock)
|
||||||
|
|
|
@ -256,7 +256,9 @@
|
||||||
s-style)
|
s-style)
|
||||||
|
|
||||||
(def/public (copy)
|
(def/public (copy)
|
||||||
(do-copy-to (new snip%)))
|
(let ([s (new snip%)])
|
||||||
|
(do-copy-to s)
|
||||||
|
s))
|
||||||
|
|
||||||
(define/public (do-copy-to dest)
|
(define/public (do-copy-to dest)
|
||||||
(send dest set-s-count s-count)
|
(send dest set-s-count s-count)
|
||||||
|
@ -550,6 +552,10 @@
|
||||||
(let ([bytes (string->bytes/utf-8 s-buffer 0 s-dtext (+ s-dtext s-count))])
|
(let ([bytes (string->bytes/utf-8 s-buffer 0 s-dtext (+ s-dtext s-count))])
|
||||||
(send f put (bytes-length bytes) bytes))))
|
(send f put (bytes-length bytes) bytes))))
|
||||||
|
|
||||||
|
(def/public (read [exact-nonnegative-integer? len]
|
||||||
|
[editor-stream-in% f])
|
||||||
|
(s-read len f))
|
||||||
|
|
||||||
(define/public (s-read len f)
|
(define/public (s-read len f)
|
||||||
(unless (len . < . 0) ; tolerate a 0-length snip, to be filtered out later
|
(unless (len . < . 0) ; tolerate a 0-length snip, to be filtered out later
|
||||||
(when ((string-length s-buffer) . < . len)
|
(when ((string-length s-buffer) . < . len)
|
||||||
|
|
|
@ -1066,7 +1066,7 @@
|
||||||
(when shift
|
(when shift
|
||||||
(send shift s-remove-child style)))
|
(send shift s-remove-child style)))
|
||||||
|
|
||||||
(let ([shift (send style get-s-join-shift-style)])
|
(let ([shift (send plain-style get-s-join-shift-style)])
|
||||||
(if shift
|
(if shift
|
||||||
(begin
|
(begin
|
||||||
(send style set-s-join-shift-style shift)
|
(send style set-s-join-shift-style shift)
|
||||||
|
|
|
@ -170,14 +170,14 @@
|
||||||
(define sticky-styles? #t)
|
(define sticky-styles? #t)
|
||||||
(define overwrite-mode? #f)
|
(define overwrite-mode? #f)
|
||||||
|
|
||||||
(def/public (set-styles-sticky [bool? s?]) (set! sticky-styles? s?))
|
(def/public (set-styles-sticky [bool? s?]) (set! sticky-styles? (and s? #t)))
|
||||||
(def/public (get-styles-sticky) sticky-styles?)
|
(def/public (get-styles-sticky) sticky-styles?)
|
||||||
|
|
||||||
(def/public (get-overwrite-mode) overwrite-mode?)
|
(def/public (get-overwrite-mode) overwrite-mode?)
|
||||||
(def/public (set-overwrite-mode [bool? v]) (set! overwrite-mode? v))
|
(def/public (set-overwrite-mode [bool? v]) (set! overwrite-mode? (and v #t)))
|
||||||
|
|
||||||
(def/public (get-sticky-styles) sticky-styles?)
|
(def/public (get-sticky-styles) sticky-styles?)
|
||||||
(def/public (set-sticky-styles [bool? v]) (set! sticky-styles? v))
|
(def/public (set-sticky-styles [bool? v]) (set! sticky-styles? (and v #t)))
|
||||||
|
|
||||||
(define need-x-copy? #f)
|
(define need-x-copy? #f)
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ All ASCII alpha-numeric characters are initialized with
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-map [char char?])
|
@defmethod[(get-map [char char?])
|
||||||
(listof symbol?)]{
|
(listof (one-of/c 'caret 'line 'selection 'user1 'user2))]{
|
||||||
|
|
||||||
Gets the mapping value for @scheme[char]. See
|
Gets the mapping value for @scheme[char]. See
|
||||||
@scheme[editor-wordbreak-map%] for more information.
|
@scheme[editor-wordbreak-map%] for more information.
|
||||||
|
@ -51,7 +51,7 @@ Gets the mapping value for @scheme[char]. See
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-map [char char?]
|
@defmethod[(set-map [char char?]
|
||||||
[value (listof symbol?)])
|
[value (listof (one-of/c 'caret 'line 'selection 'user1 'user2))])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ used.}
|
||||||
@defmethod[#:mode override
|
@defmethod[#:mode override
|
||||||
(resize [w (and/c real? (not/c negative?))]
|
(resize [w (and/c real? (not/c negative?))]
|
||||||
[h (and/c real? (not/c negative?))])
|
[h (and/c real? (not/c negative?))])
|
||||||
void?]{
|
boolean?]{
|
||||||
|
|
||||||
The bitmap will be cropped to fit in the given dimensions.
|
The bitmap will be cropped to fit in the given dimensions.
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ The @scheme[like-style] style must be in this style list, otherwise
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(notify-on-change [f ((or/c (is-a?/c style<%> false/c)) . -> . any)])
|
@defmethod[(notify-on-change [f ((or/c (is-a?/c style<%>) #f) . -> . any)])
|
||||||
any/c]{
|
any/c]{
|
||||||
|
|
||||||
Attaches a callback to the style list. The callback is invoked
|
Attaches a callback to the style list. The callback is invoked
|
||||||
|
|
|
@ -1020,10 +1020,11 @@ If the editor is displayed by multiple canvases and @scheme[all?] is
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-wordbreak-map)
|
@defmethod[(get-wordbreak-map)
|
||||||
(is-a?/c editor-wordbreak-map%)]{
|
(or/c (is-a?/c editor-wordbreak-map%) #f)]{
|
||||||
|
|
||||||
Returns the wordbreaking map that is used by the standard wordbreaking
|
Returns the wordbreaking map that is used by the standard wordbreaking
|
||||||
function. See @scheme[editor-wordbreak-map%] for more information.
|
function. See @method[text% set-wordbreak-map] and
|
||||||
|
@scheme[editor-wordbreak-map%] for more information.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user