Changeset 12598


Ignore:
Timestamp:
Aug 17, 2009, 12:19:04 AM (10 years ago)
Author:
gz
Message:

Keep track of edit-count for xhemlock-text-storage, so that setSelectedRange knows when to be a noop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/hemlock-text.lisp

    r12574 r12598  
    230230  (assume-cocoa-thread)
    231231  (> (slot-value self 'edit-count) 0))
     232
     233(objc:defmethod (#/beginEditing :void) ((self xhemlock-text-storage))
     234  (assume-cocoa-thread)
     235  (with-slots (edit-count) self
     236    #+debug
     237    (#_NSLog #@"begin-editing")
     238    (incf edit-count)
     239    #+debug
     240    (#_NSLog #@"after beginEditing on %@ edit-count now = %d" :id self :int edit-count)
     241    (call-next-method)))
     242
     243(objc:defmethod (#/endEditing :void) ((self xhemlock-text-storage))
     244  (assume-cocoa-thread)
     245  (with-slots (edit-count) self
     246    #+debug
     247    (#_NSLog #@"end-editing")
     248    (call-next-method)
     249    (assert (> edit-count 0))
     250    (decf edit-count)
     251    #+debug
     252    (#_NSLog #@"after endEditing on %@, edit-count now = %d" :id self :int edit-count)))
    232253
    233254(objc:defmethod (#/noteHemlockInsertionAtPosition:length: :void)
Note: See TracChangeset for help on using the changeset viewer.