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

Refactor: softDispatch doesn't return null #181891

Merged
merged 4 commits into from May 16, 2023
Merged

Conversation

ulugbekna
Copy link
Contributor

@@ -953,7 +953,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
// Respect chords if the allowChords setting is set and it's not Escape. Escape is
// handled specially for Zen Mode's Escape, Escape chord, plus it's important in
// terminals generally
const isValidChord = resolveResult?.kind === ResultKind.MoreChordsNeeded && this._configHelper.config.allowChords && event.key !== 'Escape';
const isValidChord = resolveResult.kind === ResultKind.MoreChordsNeeded && this._configHelper.config.allowChords && event.key !== 'Escape';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Tyriar

I refactored the keybindings resolver and, consequently, AbstractKeybindingService#softDispatch a bit in last iteration and propagated the changes to various parts of vscode that use the softDispatch. I introduced a regression in one such place and now trying to make sure my changes in other places make sense.

Would you mind confirming that what this line does matches the desired result? This particular PR doesn't do much, there's a more meaningful diff here - https://github.com/microsoft/vscode/pull/178699/files#

@Tyriar
Copy link
Member

Tyriar commented May 9, 2023

Seems fine, I think the only change that impacts me is that null is now { kind: ResultKind.NoMatchingKb }

Tyriar
Tyriar previously approved these changes May 9, 2023
Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I pushed one more change on top to adopt the change in two more places.

@ulugbekna ulugbekna enabled auto-merge (squash) May 12, 2023 08:49
@ulugbekna ulugbekna merged commit b17d4a3 into main May 16, 2023
6 checks passed
@ulugbekna ulugbekna deleted the ulugbekna/particular-horse branch May 16, 2023 14:32
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants