fixed DEL the end resulting wrong pos

This commit is contained in:
2016-04-01 04:52:41 +08:00
parent a927c90134
commit 62d2de3800
5 changed files with 28 additions and 20 deletions

View File

@@ -164,12 +164,6 @@
var stator = new Stator( cur, s );
var stack = new Stack();
c = c[ e + 1 ];
if( c == "\n" || c == undefined )
{
cur.moveX( -1 );
}
var f = stator.save( 0, removed );
stack.store( function() {
f();

View File

@@ -33,12 +33,19 @@
// Initialize this stack
this.__rec( "", true );
var l = this.__cursor.feeder.firstBuffer.cols;
var msg = Mesg( "INSERT" );
for( var i = msg.length; i < l; i ++ ) msg += " ";
this.__msg = msg;
};
INSERT.prototype.allowMovement = false;
INSERT.prototype.dispose = function()
{
this.__msg = "";
this.__rec( "", true );
this.__cursor.moveX( -1 );
};
@@ -158,11 +165,7 @@
INSERT.prototype.getMessage = function()
{
var l = this.__cursor.feeder.firstBuffer.cols;
var msg = Mesg( "INSERT" );
for( var i = msg.length; i < l; i ++ ) msg += " ";
return msg;
return this.__msg;
};
ns[ NS_EXPORT ]( EX_CLASS, "INSERT", INSERT );