Some interfaces

This commit is contained in:
2016-03-15 03:06:16 +08:00
parent cbec2c7475
commit 52e4733fcc
4 changed files with 83 additions and 2 deletions
+20
View File
@@ -12,6 +12,8 @@
/** @type {System.Debug} */
var debug = __import( "System.Debug" );
var Actions = __import( "Components.Vim.Actions.*" );
var GetLine = function( buffs, l )
{
/** @type {Components.Vim.LineBuffer} */
@@ -76,6 +78,9 @@
// The resulting position
this.P = 0;
/** @type {Components.Vim.IAction} */
this.action = null;
};
// Can only be 1, -1
@@ -210,6 +215,15 @@
this.updatePosition();
};
Cursor.prototype.openInsert = function()
{
var feeder = this.feeder;
if( this.action ) this.action.dispose();
this.action = new Actions[ "INSERT" ];
feeder.dispatcher.dispatchEvent( new BotanEvent( "VisualUpdate" ) );
};
Cursor.prototype.getLine = function()
{
var feeder = this.feeder;
@@ -225,6 +239,12 @@
return line;
};
__readOnly( Cursor.prototype, "message", function()
{
return this.action && this.action.getMessage();
} );
__readOnly( Cursor.prototype, "position", function()
{
return {