Changeset 12319


Ignore:
Timestamp:
Jun 28, 2009, 9:21:15 AM (10 years ago)
Author:
gb
Message:

Specialize #/setDocumentEdited: if the document's "edited" status changes,
force redisplay of the modeline.

Provide a means for Hemlock to tell if the document's edited.

File:
1 edited

Legend:

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

    r12283 r12319  
    15031503             ;; selection: mark at n1, point at n1+m.
    15041504             ;; In all cases, activate Hemlock selection.
    1505              (disable-paren-highlight self)
    15061505             (unless still-selecting
    15071506                (let* ((pointpos (hi:mark-absolute-position point))
     
    19001899(declaim (special hemlock-frame))
    19011900
     1901;;; If a window's document's edited status changes, update the modeline.
     1902(objc:defmethod (#/setDocumentEdited: :void) ((w hemlock-frame)
     1903                                              (edited #>BOOL))
     1904  (let* ((was-edited (#/isDocumentEdited w)))
     1905    (unless (eq was-edited edited)
     1906      (#/setNeedsDisplay: (text-pane-mode-line (slot-value w 'pane)) t)))
     1907  (call-next-method edited))
     1908
     1909
    19021910(objc:defmethod (#/miniaturize: :void) ((w hemlock-frame) sender)
    19031911  (let* ((event (#/currentEvent w))
     
    21212129
    21222130
     2131(defun hi::buffer-document-modified (buffer)
     2132  (let* ((doc (hi::buffer-document buffer)))
     2133    (if doc
     2134      (#/isDocumentEdited doc))))
    21232135
    21242136(defun perform-edit-change-notification (textstorage selector pos n &optional (extra 0))
Note: See TracChangeset for help on using the changeset viewer.