[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ctrl-k in NSTextView
From: |
Andreas Höschler |
Subject: |
Ctrl-k in NSTextView |
Date: |
Sat, 10 Jun 2006 10:53:59 +0200 |
Hello all,
please add
- (void)deleteToEndOfLine:(id)sender
{
NSTextStorage *textStorage = [self textStorage];
NSRange selectedRange = [self selectedRange];
NSRange linerange = [[textStorage string]
lineRangeForRange:NSMakeRange(selectedRange.location, 0)];
NSRange delRange = NSMakeRange(selectedRange.location,
NSMaxRange(linerange) - selectedRange.location - (linerange.length > 1
? 1 : 0));
[textStorage replaceCharactersInRange: delRange withString:@""];
}
to NSTextView_actions.m and uncomment
"Control-k" = "deleteToEndOfLine:";
in /usr/src/core/gui/KeyBindings/DefaultKeyBindings.dict.
Regards,
Andreas
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Ctrl-k in NSTextView,
Andreas Höschler <=