First char INSERT issue due to prev commit

This commit is contained in:
2017-01-25 15:42:05 +08:00
parent 42bbc3b240
commit d6a27ca87e
4 changed files with 50 additions and 6 deletions
+33 -1
View File
@@ -204,8 +204,33 @@
}
// Hacky tab compensations
if( !skipTab )
if( skipTab )
{
// Handles INSERT on first tab char
if( penetrate && 0 < d )
{
if( ( content.length - 1 ) <= x )
{
this.moveY( 1 );
this.X = 0;
this.updatePosition();
return;
}
}
}
else
{
// Handles INSERT on first tab char
if( penetrate )
{
if( line.content[0] == "\t" && x < tabStep )
{
this.moveY( -1 );
this.lineEnd( phantomSpace );
return;
}
}
var s = this.aX;
var a = rline[ s + d ];
var e = s;
@@ -283,6 +308,13 @@
};
// fix the tab position
Cursor.prototype.fixTab = function()
{
this.moveX( 1, false, true );
this.moveX( -1 );
};
Cursor.prototype.lineStart = function( atWord )
{
if( atWord )