Opened 8 years ago

Last modified 8 years ago

#1160 new defect

undo and read-only-listener problems

Reported by: rme Owned by:
Priority: normal Milestone:
Component: IDE Version: trunk
Keywords: Cc:


Ensure that "read-only listener" is checked in the preferences. Start a new listener window. Type in "xxx". Now undo via command-Z four times. An error will be signaled, because the Cocoa undo mechanism is trying to undo the insertion of the "Welcome to Clozure C..." and the insertion of the prompt.

I would guess that we need to clear any registered undo actions as soon as the listener accepts a new form. (cf. -[NSUndoManage removeAllActions]).

Change History (1)

comment:1 Changed 8 years ago by rme

I think there are (at least) two things going on. One, editor error handling is not set up in HemlockTextStorage??'s #/replaceCharactersInRange:withString:, so if we get an editor-error in there, we end up in a situation where we get the above backtrace.

If we put hi:handle-lisp-errors in that method, then we find that the method can end up being run without having *current-view* bound to the right thing. It looks like *current-view* is normally bound in handle-hemlock-event, and #/undo presumably doesn't go through there.

Note: See TracTickets for help on using tickets.