partial insert support

This commit is contained in:
2016-03-16 00:11:39 +08:00
parent b7c693be07
commit 8bc4db7283
6 changed files with 83 additions and 14 deletions
+21 -1
View File
@@ -238,12 +238,32 @@
return line;
};
// The absX for current Line
__readOnly( Cursor.prototype, "aX", function()
{
var X = this.X;
var f = this.feeder;
// Calculate wordwrap offset
if( f.wrap )
{
var cols = f.firstBuffer.cols + 1;
var w = X < cols ? 0 : Math.floor( X / cols );
if( 0 < w )
{
X -= w;
}
}
return X;
} );
__readOnly( Cursor.prototype, "message", function()
{
return this.action && this.action.getMessage();
} );
__readOnly( Cursor.prototype, "position", function()
{
return {