commit 3d2f3b889a8456a6fad1c353e3a1faea1ba9fe3d
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2016-04-03T12:19:45Z |
| subject | Used the wrong movement function |
commit 3d2f3b889a8456a6fad1c353e3a1faea1ba9fe3d
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2016-04-03T12:19:45Z
Used the wrong movement function
---
botanjs/src/Components/Vim/Actions/TO.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/botanjs/src/Components/Vim/Actions/TO.js b/botanjs/src/Components/Vim/Actions/TO.js
index b1a0dbc..1ff0bcd 100644
--- a/botanjs/src/Components/Vim/Actions/TO.js
+++ b/botanjs/src/Components/Vim/Actions/TO.js
@@ -28,8 +28,8 @@
var f = cur.feeder;
var n = cur.getLine().lineNum;
- var p = f.content.indexOf( "\n" );
- for( i = 1; p != -1 && i < n; i ++ )
+ var p = 0;
+ for( i = 0; p != -1 && i < n; i ++ )
{
p = f.content.indexOf( "\n", p + 1 );
}
@@ -68,7 +68,7 @@
if( lowerLimmit <= tX && tX < upperLimit )
{
- cur.moveX( tX - lowerLimmit - cX );
+ cur.moveTo( tX );
}
else beep();
};