-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Assign activeTextEditor to local variable first. #3866
Conversation
because activeTexteditor may have changed after call async method. fixes VSCodeVim#3865
Travis tests have failedHey @yaegaki, Node.js: 8if [[ $(git diff-index HEAD -- *.js *.ts *.md) ]]; then git diff; echo "Prettier Failed. Run `gulp forceprettier` and commit changes to resolve."; exit 1; fi
npm test
TravisBuddy Request Identifier: 9fc5a970-9e7e-11e9-80b6-37a8a59c6ad9 |
src/actions/commands/actions.ts
Outdated
@@ -2765,14 +2765,12 @@ class CommandGoToDefinition extends BaseCommand { | |||
isJump = true; | |||
|
|||
public async exec(position: Position, vimState: VimState): Promise<VimState> { | |||
const oldActiveEditor = vimState.editor; | |||
|
|||
await vscode.commands.executeCommand('editor.action.goToDeclaration'); | |||
// `executeCommand` returns immediately before cursor is updated | |||
// wait for the editor to update before updating the vim state | |||
// https://github.com/VSCodeVim/Vim/issues/3277 | |||
await waitForCursorSync(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this wait and the comments above it?
Travis tests have failedHey @yaegaki, Node.js: 8if [[ $(git diff-index HEAD -- *.js *.ts *.md) ]]; then git diff; echo "Prettier Failed. Run `gulp forceprettier` and commit changes to resolve."; exit 1; fi
npm test
TravisBuddy Request Identifier: 1031f180-a18d-11e9-b4a0-0f4450928f2b |
Test failure looks unrelated, kicking off another one. |
What this PR does / why we need it:
Fix GoToDefinition bug when use C# extension.
Which issue(s) this PR fixes
#3865