commit 68ee6dacc6258059cc3dba8eebf0fd27448d3851
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2017-03-15T07:12:42Z |
| subject | Fixed JOIN_LINES did not work properly |
commit 68ee6dacc6258059cc3dba8eebf0fd27448d3851
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2017-03-15T07:12:42Z
Fixed JOIN_LINES did not work properly
---
botanjs/src/Components/Vim/Actions/JOIN_LINES.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/botanjs/src/Components/Vim/Actions/JOIN_LINES.js b/botanjs/src/Components/Vim/Actions/JOIN_LINES.js
index 4f21af6..4362765 100644
--- a/botanjs/src/Components/Vim/Actions/JOIN_LINES.js
+++ b/botanjs/src/Components/Vim/Actions/JOIN_LINES.js
@@ -66,7 +66,10 @@
var content = feeder.content;
- contentUndo = feeder.content.substring( start, end );
+ var l = content.length;
+ while( "\t ".indexOf( content[ end ] ) != -1 && end < l ) end ++;
+
+ contentUndo = content.substring( start, end );
feeder.content = content.substring( 0, start ) + " " + content.substr( end );
}