Ticket #7674: backward-kill-word.diff

File backward-kill-word.diff, 783 bytes (added by GeneralMaximus, 13 years ago)
  • src/kits/interface/TextView.cpp

     
    32713271void
    32723272BTextView::_HandleBackspace()
    32733273{
     3274    int32 modifiers = 0;
     3275    BMessage *message = Window()->CurrentMessage();
     3276    if (message != NULL)
     3277            message->FindInt32("modifiers", &modifiers);
     3278   
     3279    bool optDown = modifiers & B_OPTION_KEY;
     3280   
    32743281    if (fUndo) {
    32753282        TypingUndoBuffer *undoBuffer = dynamic_cast<TypingUndoBuffer*>(
    32763283            fUndo);
     
    32843291    if (fSelStart == fSelEnd) {
    32853292        if (fSelStart == 0)
    32863293            return;
     3294        else if (optDown)
     3295            fSelStart = _PreviousWordStart(fSelStart);
    32873296        else
    32883297            fSelStart = _PreviousInitialByte(fSelStart);
    32893298    } else