Ticket #4673: 4673_3.patch

File 4673_3.patch, 1.2 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/undo/plugin.js

     
    242242
    243243                                                if ( beforeTypeImage.contents != currentSnapshot )
    244244                                                {
     245                                                        // It's safe to now indicate typing state.
     246                                                        this.typing = true;
     247
    245248                                                        // This's a special save, with specified snapshot
    246249                                                        // and without auto 'fireChange'.
    247250                                                        if ( !this.save( false, beforeTypeImage, false ) )
     
    263266
    264267                        this.lastKeystroke = keystroke;
    265268
    266                         // Ignore modifier keys. (#4673)
    267                         if( isModifierKey )
    268                                 return;
    269269                        // Create undo snap after typed too much (over 25 times).
    270270                        if ( isEditingKey )
    271271                        {
     
    274274
    275275                                if ( this.modifiersCount > 25 )
    276276                                {
    277                                         this.save();
     277                                        this.save( false, null, false );
    278278                                        this.modifiersCount = 1;
    279279                                }
    280280                        }
     
    285285
    286286                                if ( this.typesCount > 25 )
    287287                                {
    288                                         this.save();
     288                                        this.save( false, null, false );
    289289                                        this.typesCount = 1;
    290290                                }
    291291                        }
    292292
    293                         this.typing = true;
    294293                },
    295294
    296295                reset : function()      // Reset the undo stack.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy