commit 4b200697dcebbbbc004b124c0d002412d1461bc7
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2017-01-09T02:48:00Z |
| subject | Fixed autoIndent by tab pos error |
commit 4b200697dcebbbbc004b124c0d002412d1461bc7
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2017-01-09T02:48:00Z
Fixed autoIndent by tab pos error
---
botanjs/src/Components/Vim/Actions/INSERT.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/botanjs/src/Components/Vim/Actions/INSERT.js b/botanjs/src/Components/Vim/Actions/INSERT.js
index 08310ea..4beaca5 100644
--- a/botanjs/src/Components/Vim/Actions/INSERT.js
+++ b/botanjs/src/Components/Vim/Actions/INSERT.js
@@ -197,7 +197,7 @@
{
this.__realizeIndent();
feeder.pan();
- cur.moveX( 1, false, true );
+ cur.moveX( inputChar == "\t" ? feeder.firstBuffer.tabWidth : 1, false, true );
}
feeder.dispatcher.dispatchEvent( new BotanEvent( "VisualUpdate" ) );
@@ -262,7 +262,7 @@
feeder.softReset();
feeder.pan();
- cur.moveX( i, false, true );
+ cur.moveX( i * feeder.firstBuffer.tabWidth, false, true );
var a = [];
a[ IN_START ] = f;