forked from Botanical/BotanJS
calculate document position
This commit is contained in:
parent
62d2de3800
commit
ddc7058964
@ -16,7 +16,6 @@
|
|||||||
{
|
{
|
||||||
this.__reset( Cursor );
|
this.__reset( Cursor );
|
||||||
this.__msg = Mesg( "VISUAL" );
|
this.__msg = Mesg( "VISUAL" );
|
||||||
this.__leaveMesg = "";
|
|
||||||
|
|
||||||
Cursor.blink = false;
|
Cursor.blink = false;
|
||||||
Cursor.pSpace = true;
|
Cursor.pSpace = true;
|
||||||
@ -35,7 +34,6 @@
|
|||||||
|
|
||||||
VISUAL.prototype.dispose = function()
|
VISUAL.prototype.dispose = function()
|
||||||
{
|
{
|
||||||
this.__msg = this.__leaveMesg;
|
|
||||||
var c = this.__cursor;
|
var c = this.__cursor;
|
||||||
|
|
||||||
c.blink = true;
|
c.blink = true;
|
||||||
@ -45,10 +43,12 @@
|
|||||||
|
|
||||||
// This fix the highlighting position of missing phantomSpace
|
// This fix the highlighting position of missing phantomSpace
|
||||||
// for maximum filled line
|
// for maximum filled line
|
||||||
if( c.feeder.wrap )
|
if( c.feeder.wrap && 0 < c.X )
|
||||||
{
|
{
|
||||||
|
c.suppressEvent();
|
||||||
c.moveX( -1 );
|
c.moveX( -1 );
|
||||||
c.moveX( 1 );
|
c.moveX( 1 );
|
||||||
|
c.unsuppressEvent();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -92,7 +92,7 @@
|
|||||||
cur.moveTo( this.__startaP );
|
cur.moveTo( this.__startaP );
|
||||||
}
|
}
|
||||||
|
|
||||||
this.__leaveMesg = Action.getMessage();
|
this.__msg = Action.getMessage();
|
||||||
|
|
||||||
Action.dispose();
|
Action.dispose();
|
||||||
cur.unsuppressEvent();
|
cur.unsuppressEvent();
|
||||||
|
@ -387,7 +387,7 @@
|
|||||||
this.__pulseMsg = this.action.getMessage();
|
this.__pulseMsg = this.action.getMessage();
|
||||||
this.action = null;
|
this.action = null;
|
||||||
|
|
||||||
debug.Info( "closeAction" );
|
debug.Info( "closeAction: " + this.__pulseMsg );
|
||||||
|
|
||||||
// Reset the analyzed content
|
// Reset the analyzed content
|
||||||
this.Vim.contentAnalyzer.reset();
|
this.Vim.contentAnalyzer.reset();
|
||||||
|
@ -226,11 +226,18 @@
|
|||||||
__readOnly( Feeder.prototype, "docPos", function() {
|
__readOnly( Feeder.prototype, "docPos", function() {
|
||||||
var pos = "ALL";
|
var pos = "ALL";
|
||||||
|
|
||||||
if( 0 < this.panY && this.EOF )
|
if( 0 < this.panY )
|
||||||
|
{
|
||||||
|
if( this.EOF )
|
||||||
{
|
{
|
||||||
pos = "BOTTOM";
|
pos = "BOTTOM";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
pos = Math.floor( ( this.panY / ( this.linesTotal - ( this.__rows - 1 ) ) ) * 100 ) + "%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if( this.__clseLine || !this.EOF )
|
if( this.__clseLine || !this.EOF )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user