Changeset 14660


Ignore:
Timestamp:
Feb 28, 2011, 11:33:58 PM (9 years ago)
Author:
gb
Message:

When modifying a document's textstorage on Cocotron, explicitly
call the document's #/updateChangeCount: method. (This ordinarily
is the responsibility of the document's NSUndoManager, but Cocotron's
NSUndoManager support is broken.)
This gives visual indication of the document's modified state in the
containing window's titlebar and modeline and notifies the document
controller that it should prompt to save modified documents. Since
NSRunAlertPanel() seems to now be usable on Cocotron (see ticket:818),
this fixes ticket:813.

File:
1 edited

Legend:

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

    r14560 r14660  
    594594        (#/replaceCharactersInRange:withString:
    595595         mirror replacerange replacestring))
     596      #+cocotron
     597      (#/updateChangeCount: document #$NSChangeDone)
    596598      (when (and undo-mgr (not (#/isUndoing undo-mgr)))
    597599        (#/replaceCharactersAtPosition:length:withString:
     
    621623                                      range (- n))
    622624      (#/deleteCharactersInRange: mirror range)
     625      #+cocotron
     626      (#/updateChangeCount: document #$NSChangeDone)     
    623627      (when (and undo-mgr (not (#/isUndoing undo-mgr)))
    624628        (#/replaceCharactersAtPosition:length:withString:
     
    645649      (#/edited:range:changeInLength: self (logior #$NSTextStorageEditedCharacters
    646650                                                   #$NSTextStorageEditedAttributes) range 0)
     651      #+cocotron
     652      (#/updateChangeCount: document #$NSChangeDone)     
    647653      (when (and undo-mgr (not (#/isUndoing undo-mgr)))
    648654        (#/replaceCharactersAtPosition:length:withString:
Note: See TracChangeset for help on using the changeset viewer.