audit drracket begin-edit-sequence calls

after this (and the previous) commit, shift-left and
shift-right seem to work properly again
This commit is contained in:
Robby Findler 2013-09-14 19:22:41 -05:00
parent 2b30be3265
commit 21e06eec53
5 changed files with 26 additions and 25 deletions

View File

@ -1336,7 +1336,7 @@ profile todo:
src
(λ ()
(hash-set! edit-sequence-ht src #f)
(send src begin-edit-sequence #f)
(send src begin-edit-sequence #f #f)
(when (send src is-locked?)
(hash-set! locked-ht src #t)
(send src lock #f))))))
@ -1394,7 +1394,7 @@ profile todo:
(hash-for-each
edit-sequence-ht
(λ (txt _)
(send txt begin-edit-sequence #f)))
(send txt begin-edit-sequence #f #f)))
(hash-for-each
edit-sequence-ht
(λ (txt _)
@ -1889,7 +1889,7 @@ profile todo:
;; clear-profile-display : -> void
;; clears out the GUI showing the profile results
(define/public (clear-profile-display)
(begin-edit-sequence)
(begin-edit-sequence #t #f)
(let ([locked? (is-locked?)])
(lock #f)
(clear-old-results)
@ -1910,7 +1910,7 @@ profile todo:
;; does the work to erase any existing profile info
;; and make new profiling info.
(define/public (refresh-profile profile-info definitions-text)
(begin-edit-sequence)
(begin-edit-sequence #t #f)
(lock #f)
(erase)
(clear-old-results)
@ -1952,7 +1952,7 @@ profile todo:
(number? span))
(unless (hash-ref in-edit-sequence src (λ () #f))
(hash-set! in-edit-sequence src #t)
(send src begin-edit-sequence))
(send src begin-edit-sequence #t #f))
(let* ([color (get-color-value
(if (eq? (preferences:get 'drracket:profile-how-to-count) 'time)
(prof-info-time info)
@ -2058,7 +2058,7 @@ profile todo:
(λ ()
(hash-for-each
in-edit-sequence
(λ (key val) (send key begin-edit-sequence)))
(λ (key val) (send key begin-edit-sequence #t #f)))
(clear-highlight)
(hash-for-each
in-edit-sequence

View File

@ -580,7 +580,8 @@ TODO
(define locs (or (get-error-ranges) '())) ;; calling set-error-range cleans up the locs
(define error-arrows (and raw-error-arrows (cleanup-locs raw-error-arrows)))
(for-each (λ (loc) (send (srcloc-source loc) begin-edit-sequence)) locs)
(for ([loc (in-list locs)])
(send (srcloc-source loc) begin-edit-sequence #t #f))
(when color?
(let ([resets
@ -639,7 +640,7 @@ TODO
(when (and (is-a? source text%)
(srcloc-position loc)
(srcloc-span loc))
(send source begin-edit-sequence)
(send source begin-edit-sequence #t #f)
(clear-error-highlighting) ;; clear the 'highlight-range' from previous errors

View File

@ -224,7 +224,7 @@
(define/public (get-show-docs?) (and the-strs (or locked? mouse-in-blue-box?)))
(define/public (toggle-syncheck-docs)
(begin-edit-sequence)
(begin-edit-sequence #t #f)
(invalidate-blue-box-region)
(cond
[locked?
@ -240,7 +240,7 @@
(end-edit-sequence))
(define/public (update-mouse-in-blue-box b)
(unless (equal? b mouse-in-blue-box?)
(begin-edit-sequence)
(begin-edit-sequence #t #f)
(invalidate-blue-box-region)
(set! mouse-in-blue-box? b)
(invalidate-blue-box-region)
@ -248,7 +248,7 @@
(define/public (update-locked b)
(preferences:set 'drracket:syncheck:contracts-locked? b)
(unless (equal? b locked?)
(begin-edit-sequence)
(begin-edit-sequence #t #f)
(invalidate-blue-box-region)
(set! locked? b)
(invalidate-blue-box-region)
@ -256,7 +256,7 @@
(define/public (update-mouse-in-lock-icon/read-more? lk? rm?)
(unless (and (equal? lk? mouse-in-lock-icon?)
(equal? rm? mouse-in-read-more?))
(begin-edit-sequence)
(begin-edit-sequence #t #f)
(invalidate-blue-box-region)
(set! mouse-in-lock-icon? lk?)
(set! mouse-in-read-more? rm?)
@ -426,7 +426,7 @@
(define/private (update-the-strs)
(update-the-strs/maybe-invalidate
(λ ()
(begin-edit-sequence)
(begin-edit-sequence #t #f)
(invalidate-blue-box-region))
(λ ()
(when last-evt-seen
@ -485,7 +485,7 @@
(< where the-strs-id-end))
(and delete? (<= the-strs-id-start (+ where len) the-strs-id-end)))
(when the-strs
(begin-edit-sequence)
(begin-edit-sequence #t #f)
(invalidate-blue-box-region)
(set! the-strs #f)
(set! the-strs-id-start #f)

View File

@ -305,7 +305,7 @@ If the namespace does not, they are colored the unbound color.
(mixin ((class->interface text%)) (cs-clearing<%>)
(inherit begin-edit-sequence end-edit-sequence)
(define/augment (on-delete start len)
(begin-edit-sequence)
(begin-edit-sequence #f #t)
(inner (void) on-delete start len))
(define/augment (after-delete start len)
(inner (void) after-delete start len)
@ -313,7 +313,7 @@ If the namespace does not, they are colored the unbound color.
(end-edit-sequence))
(define/augment (on-insert start len)
(begin-edit-sequence)
(begin-edit-sequence #f #t)
(inner (void) on-insert start len))
(define/augment (after-insert start len)
(inner (void) after-insert start len)
@ -1728,7 +1728,7 @@ If the namespace does not, they are colored the unbound color.
(let ([definitions (get-defs)])
(when (send definitions syncheck:arrows-visible?)
(let ([locked? (send definitions is-locked?)])
(send definitions begin-edit-sequence #f)
(send definitions begin-edit-sequence #f #f)
(send definitions lock #f)
(send definitions syncheck:clear-arrows)
(send definitions lock locked?)
@ -2179,7 +2179,7 @@ If the namespace does not, they are colored the unbound color.
;; so that edits to the definitions text work out.
(define/private (with-lock/edit-sequence definitions-text thnk)
(let* ([locked? (send definitions-text is-locked?)])
(send definitions-text begin-edit-sequence)
(send definitions-text begin-edit-sequence #t #f)
(send definitions-text lock #f)
(thnk)
(send definitions-text end-edit-sequence)

View File

@ -607,7 +607,7 @@
;; the reader-module method's result is used a test of whether or
;; not the get-metadata method is used for this language
(let ([metadata (send lang get-metadata (filename->modname filename) settings)])
(begin-edit-sequence #f)
(begin-edit-sequence #f #f)
(begin-metadata-changes)
(let ([locked? (is-locked?)])
(when locked? (lock #f))
@ -648,7 +648,7 @@
(define/augment (on-load-file filename format)
(inner (void) on-load-file filename format)
(begin-edit-sequence #f))
(begin-edit-sequence #f #f))
(define/augment (after-load-file success?)
(when success?
(let-values ([(module-language module-language-settings)
@ -902,7 +902,7 @@
next-settings))))
(when auto-text
(set! ignore-edits? #t)
(begin-edit-sequence #f)
(begin-edit-sequence #f #f)
(insert auto-text)
(set-modified #f)
(set! ignore-edits? #f)
@ -912,7 +912,7 @@
(when (and (not really-modified?)
(not (get-filename))
(> (last-position) 0))
(begin-edit-sequence #f)
(begin-edit-sequence #f #f)
(send this erase)
(set-modified #f)
(end-edit-sequence)
@ -2394,7 +2394,7 @@
(cond
[(and name (file-exists? name))
(ensure-rep-hidden)
(send definitions-text begin-edit-sequence)
(send definitions-text begin-edit-sequence #t #f)
(send definitions-text load-file/gui-error name)
(send definitions-text end-edit-sequence)
(send language-message set-yellow #f)]
@ -3003,8 +3003,8 @@
(set! interactions-text (send current-tab get-ints))
(begin-container-sequence)
(send definitions-text begin-edit-sequence)
(send interactions-text begin-edit-sequence)
(send definitions-text begin-edit-sequence #t #f)
(send interactions-text begin-edit-sequence #t #f)
(for-each (λ (defs-canvas) (send defs-canvas set-editor definitions-text #f))
definitions-canvases)
(for-each (λ (ints-canvas) (send ints-canvas set-editor interactions-text #f))