commit 20a8ced8014cabd00f397a1b4f2e4c76fd6ebb6d
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2016-04-04T23:09:27Z |
| subject | s-->e visual line AP at upper limit misplaced |
commit 20a8ced8014cabd00f397a1b4f2e4c76fd6ebb6d
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2016-04-04T23:09:27Z
s-->e visual line AP at upper limit misplaced
---
botanjs/src/Components/Vim/Actions/VISUAL.js | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/botanjs/src/Components/Vim/Actions/VISUAL.js b/botanjs/src/Components/Vim/Actions/VISUAL.js
index d650abd..1d4071d 100644
--- a/botanjs/src/Components/Vim/Actions/VISUAL.js
+++ b/botanjs/src/Components/Vim/Actions/VISUAL.js
@@ -233,6 +233,18 @@
if( startLine.aPos < minAp )
{
pstart = 0;
+
+ if( this.__mode == MODE_LINE )
+ {
+ cur.suppressEvent();
+
+ cur.lineEnd( true );
+ nstart = cur.PStart;
+
+ cur.moveTo( currAp, true );
+
+ cur.unsuppressEvent();
+ }
}
// highlight from the end
else if( maxAp < startLine.aPos )
@@ -309,7 +321,7 @@
// Sets the visual position
// s-->e
- if( 0 < posDiff )
+ if( 0 <= posDiff )
{
newPos = newPos + 1;
}