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