Index: Goatee/editing-stream.lisp =================================================================== RCS file: /project/mcclim/cvsroot/mcclim/Goatee/editing-stream.lisp,v retrieving revision 1.21 diff -u -r1.21 editing-stream.lisp --- Goatee/editing-stream.lisp 22 Feb 2005 14:00:18 -0000 1.21 +++ Goatee/editing-stream.lisp 26 Feb 2006 11:31:23 -0000 @@ -160,31 +160,42 @@ (return-from stream-process-gesture gesture)) (let ((area (area stream)) (snapshot (snapshot stream))) - (execute-gesture-command gesture area *simple-area-gesture-table*) + (unless (execute-gesture-command gesture area *simple-area-gesture-table*) + (when (and (boundp '*application-frame*) (application-frame-p *application-frame*)) + (handler-case + (execute-frame-command *application-frame* + (lookup-keystroke-command-item + gesture + (frame-command-table *application-frame*))) + (command-not-present () + ;; gestures with modifiers will send one or several + ;; (modifier down) events. These will probably not be + ;; found, so ignore them. + nil)))) (make-input-editing-stream-snapshot snapshot area) (let ((first-mismatch (mismatch (stream-input-buffer snapshot) (stream-input-buffer stream)))) (unwind-protect - (cond ((null first-mismatch) - ;; No change actually took place, event though IP may have - ;; moved. - nil) - ((< first-mismatch (stream-scan-pointer stream)) - ;; Throw out. Buffer is still updated by protect forms - (immediate-rescan stream)) - ((and (eql first-mismatch - (1- (stream-insertion-pointer snapshot))) - (eql (aref (stream-input-buffer snapshot) first-mismatch) - gesture)) - ;; As best we can tell an insertion happened: one gesture was - ;; entered it was inserted in the buffer. There may be other - ;; changes above IP, but we don't care. - gesture) - (t - ;; Other random changes, but we want to allow more editing - ;; before scanning them. - (queue-rescan stream) - nil)) + (cond ((null first-mismatch) + ;; No change actually took place, event though IP may have + ;; moved. + nil) + ((< first-mismatch (stream-scan-pointer stream)) + ;; Throw out. Buffer is still updated by protect forms + (immediate-rescan stream)) + ((and (eql first-mismatch + (1- (stream-insertion-pointer snapshot))) + (eql (aref (stream-input-buffer snapshot) first-mismatch) + gesture)) + ;; As best we can tell an insertion happened: one gesture was + ;; entered it was inserted in the buffer. There may be other + ;; changes above IP, but we don't care. + gesture) + (t + ;; Other random changes, but we want to allow more editing + ;; before scanning them. + (queue-rescan stream) + nil)) (let ((snapshot-buffer (stream-input-buffer snapshot)) (stream-buffer (stream-input-buffer stream))) (setf (stream-insertion-pointer stream)