Skip to content

Commit

Permalink
Hack to mitigate #569 and prevent extension from locking up
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoon committed Aug 6, 2016
1 parent bb0b5df commit 743e997
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 build']));
gulp.task('watch', shell.task(['npm run compile']));
gulp.task('init', ['typings']);
gulp.task('default', ['tslint', 'compile']);
gulp.task('release', ['default', 'patch']);
8 changes: 8 additions & 0 deletions src/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 743e997

Please sign in to comment.