Fixed last line cannot be dd-ed

This commit is contained in:
斟酌 鵬兄 2017-01-28 13:20:01 +08:00
parent a847510f49
commit f85e65c23e
2 changed files with 8 additions and 3 deletions

View File

@ -153,6 +153,9 @@
e = sp;
}
// For removing the very last line
if( c[ sp ] == undefined ) s --;
var removed = c.substring( s, e + 1 );
reg.change( removed, newLine );

View File

@ -87,11 +87,11 @@
if( detectScreenSize )
{
var val = element.value;
this.__testScreen(function() { _self.VisualizeVimFrame( val ); });
this.__testScreen(function() { _self.__visualize( val ); });
}
else
{
this.VisualizeVimFrame( element.value );
this.__visualize( element.value );
}
// Set buffer index
@ -177,7 +177,8 @@
}
};
VimArea.prototype.VisualizeVimFrame = function( content )
// Visualize the Vim Frame
VimArea.prototype.__visualize = function( content )
{
var _self = this;
this.content = content;
@ -263,6 +264,7 @@
);
this.stage.addEventListeners( this.__stagedEvents );
this.dispatchEvent( new BotanEvent( "Visualized" ) );
};
VimArea.prototype.demo = function( seq )