diff --git a/ChangeLog b/ChangeLog index 5846446b7..aae73e106 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-11-05 Wolfgang Lux + * KeyBindings/DefaultKeyBindings.dict: Enable Ctrl-l key binding + and add Ctrl-o key binding as in Emacs and Cocoa. + * Source/NSTextView_actions.m (-insertNewlineIgnoringFieldEditor:, + -insertTabIgnoringFieldEditor): Implement NSResponder methods. + * Source/NSWindow.m (-dealloc): Release the toolbar without updating the window's geometry and thus avoid calling the delegate during deallocation. diff --git a/KeyBindings/DefaultKeyBindings.dict b/KeyBindings/DefaultKeyBindings.dict index 9360222b6..82af559a2 100644 --- a/KeyBindings/DefaultKeyBindings.dict +++ b/KeyBindings/DefaultKeyBindings.dict @@ -62,9 +62,10 @@ "Control-e" = "moveToEndOfLine:"; "Control-f" = "moveForward:"; "Control-h" = "deleteBackward:"; - /* "Control-l" = "centerSelectionInVisibleArea:"; */ + "Control-l" = "centerSelectionInVisibleArea:"; "Control-k" = "deleteToEndOfLine:"; "Control-n" = "moveDown:"; + "Control-o" = ( "insertNewlineIgnoringFieldEditor:", "moveBackward:" ); "Control-p" = "moveUp:"; "Control-t" = "transpose:"; "Control-v" = "pageDown:"; diff --git a/Source/NSTextView_actions.m b/Source/NSTextView_actions.m index c5b07467b..b9f3450c0 100644 --- a/Source/NSTextView_actions.m +++ b/Source/NSTextView_actions.m @@ -548,6 +548,16 @@ static NSNumber *float_plus_one(NSNumber *cur) //[self insertText: @"\t"]; } +- (void) insertNewlineIgnoringFieldEditor: (id)sender +{ + [self insertText: @"\n"]; +} + +- (void) insertTabIgnoringFieldEditor: (id)sender +{ + [self insertText: @"\t"]; +} + - (void) deleteForward: (id)sender {