Hack to mitigate #569 and prevent extension from locking up (#576)

This commit is contained in:
Jason Poon 2016-08-06 11:33:22 +10:00 committed by GitHub
parent bb0b5df744
commit 06c4906d5a
2 changed files with 10 additions and 4 deletions

View File

@ -73,10 +73,8 @@ gulp.task('tslint', ['fix-whitespace'], function() {
return merge(srcs, tests);
});
gulp.task('compile', shell.task([
'node ./node_modules/vscode/bin/compile -p ./',
]));
gulp.task('compile', shell.task(['npm run vscode:prepublish']));
gulp.task('watch', shell.task(['npm run compile']));
gulp.task('init', ['typings']);
gulp.task('default', ['tslint', 'compile']);
gulp.task('release', ['default', 'patch']);

View File

@ -573,6 +573,14 @@ class CommandHash extends BaseCommand {
vimState.searchState = new SearchState(SearchDirection.Backward, vimState.cursorPosition, currentWord);
// hack start
// temporary fix for https://github.com/VSCodeVim/Vim/issues/569
let text = TextEditor.getText(new vscode.Range(vimState.cursorPosition, vimState.cursorPosition.getRight()));
if (text === " ") {
return vimState;
}
// hack end
do {
// use getWordLeft() on position to start at the beginning of the word.
// this ensures that any matches happen ounside of the word currently selected,