Fixed a -> Enter -> BS -> Esc -> u inconsistency

This commit is contained in:
斟酌 鵬兄 2016-03-31 02:51:42 +08:00
parent 553cab9776
commit 1bc1a90b31
1 changed files with 3 additions and 2 deletions

View File

@ -39,8 +39,8 @@
INSERT.prototype.dispose = function() INSERT.prototype.dispose = function()
{ {
this.__cursor.moveX( -1 );
this.__rec( "", true ); this.__rec( "", true );
this.__cursor.moveX( -1 );
}; };
INSERT.prototype.__rec = function( c, newRec ) INSERT.prototype.__rec = function( c, newRec )
@ -92,12 +92,13 @@
if( this.__insertLength <= 0 ) if( this.__insertLength <= 0 )
{ {
this.__contentUndo = feeder.content.substr( f, 1 ) + this.__contentUndo; this.__contentUndo = feeder.content.substr( f, 1 ) + this.__contentUndo;
this.__insertLength --;
} }
feeder.content = feeder.content =
feeder.content.substring( 0, f ) feeder.content.substring( 0, f )
+ feeder.content.substring( f + 1 ); + feeder.content.substring( f + 1 );
this.__insertLength --;
} }
else if( e.kMap( "Del" ) ) else if( e.kMap( "Del" ) )
{ {