Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 vscode:prepublish']));
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