From 1bc1a90b31fc3e4c308b318f6fdd1c72bbdcb814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Thu, 31 Mar 2016 02:51:42 +0800 Subject: [PATCH] Fixed a -> Enter -> BS -> Esc -> u inconsistency --- botanjs/src/Components/Vim/Actions/INSERT.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/botanjs/src/Components/Vim/Actions/INSERT.js b/botanjs/src/Components/Vim/Actions/INSERT.js index e67f083..7eb38eb 100644 --- a/botanjs/src/Components/Vim/Actions/INSERT.js +++ b/botanjs/src/Components/Vim/Actions/INSERT.js @@ -39,8 +39,8 @@ INSERT.prototype.dispose = function() { - this.__cursor.moveX( -1 ); this.__rec( "", true ); + this.__cursor.moveX( -1 ); }; INSERT.prototype.__rec = function( c, newRec ) @@ -92,12 +92,13 @@ if( this.__insertLength <= 0 ) { this.__contentUndo = feeder.content.substr( f, 1 ) + this.__contentUndo; - this.__insertLength --; } feeder.content = feeder.content.substring( 0, f ) + feeder.content.substring( f + 1 ); + + this.__insertLength --; } else if( e.kMap( "Del" ) ) {