forked from Botanical/BotanJS
Rewrite moveX function
This commit is contained in:
@@ -44,9 +44,13 @@
|
||||
var feeder = cur.feeder;
|
||||
|
||||
var newLine = cput.newLine;
|
||||
|
||||
// Compensation
|
||||
var c = e.kMap( "P" ) ? 0 : -1;
|
||||
|
||||
if( newLine )
|
||||
{
|
||||
cur.moveY( 1 );
|
||||
cur.moveY( -c );
|
||||
cur.lineStart();
|
||||
}
|
||||
|
||||
@@ -69,7 +73,7 @@
|
||||
stack.store( function()
|
||||
{
|
||||
f();
|
||||
cur.moveY( -1 );
|
||||
cur.moveY( c );
|
||||
} );
|
||||
}
|
||||
else
|
||||
|
@@ -36,10 +36,20 @@
|
||||
VISUAL.prototype.dispose = function()
|
||||
{
|
||||
this.__msg = this.__leaveMesg;
|
||||
this.__cursor.blink = true;
|
||||
this.__cursor.pSpace = false;
|
||||
this.__cursor.PStart = this.__selStart;
|
||||
this.__cursor.PEnd = this.__selStart + 1;
|
||||
var c = this.__cursor;
|
||||
|
||||
c.blink = true;
|
||||
c.pSpace = false;
|
||||
c.PStart = this.__selStart;
|
||||
c.PEnd = this.__selStart + 1;
|
||||
|
||||
// This fix the highlighting position of missing phantomSpace
|
||||
// for maximum filled line
|
||||
if( c.feeder.wrap )
|
||||
{
|
||||
c.moveX( -1 );
|
||||
c.moveX( 1 );
|
||||
}
|
||||
};
|
||||
|
||||
VISUAL.prototype.handler = function( e, done )
|
||||
|
Reference in New Issue
Block a user