Skip to content

Emmet: canceling wrap shouldn't add tab to the active editor - #8489

Merged
Erich Gamma (egamma) merged 3 commits into
microsoft:masterfrom
mrmlnc:fix-8450
Jun 29, 2016
Merged

Erich Gamma (egamma) merged 3 commits into
microsoft:masterfrom
mrmlnc:fix-8450

Conversation

@mrmlnc

Copy link
Copy Markdown
Contributor

Source: #8450

Before:
2016-06-29_12-48-01

After
2016-06-29_12-49-03

@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified Erich Gamma (@egamma) to be a potential reviewer

@msftclas

Hi Denis Malinochkin (@mrmlnc), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@mrmlnc

Denis Malinochkin (mrmlnc) commented Jun 29, 2016 •

Copy link
Copy Markdown
Contributor Author

Works fine with HTML and other syntaxes that are supported by Emmet, but does not work with files with plain text syntax and syntaxes that are nor supported by Emmet.

2016-06-29_13-50-15

The method noExpansionOccurred returns native tab for all Emmet commands.

@egamma

Erich Gamma (egamma) commented Jun 29, 2016 •

Copy link
Copy Markdown
Member

Denis Malinochkin (@mrmlnc) Thanks for the PR. If refactored the implementation so that there this special casing on the actionId is no longer needed.

        if (actionId === 'editor.emmet.action.expandAbbreviation') {
            this.editor.trigger('emmet', Handler.Tab, {});
        }

The solution was to move the noEpansionOccurred from the EditorAccessor to the EmmetAction base class. The method is then overridden for the ExpandAbbreviation action.

@mrmlnc

Copy link
Copy Markdown
Contributor Author

Erich Gamma (@egamma) Great idea 🎉

@mrmlnc

Copy link
Copy Markdown
Contributor Author

Erich Gamma (@egamma), but we have a problem:

*** Error: /src/vs/workbench/parts/emmet/node/actions/base64.ts(81,24): Property 'noExpansionOccurred' does not exist on type 'EditorAccessor'.
*** Error: /src/vs/workbench/parts/emmet/node/actions/updateTag.ts(38,24): Property 'noExpansionOccurred' does not exist on type 'EditorAccessor'.
*** Error: /src/vs/workbench/parts/emmet/node/actions/wrapWithAbbreviation.ts(38,24): Property 'noExpansionOccurred' does not exist on type 'EditorAccessor'.
*** Finished with 3 errors.

@egamma

Copy link
Copy Markdown
Member

hmm, looks like the incremental compile didn't flag this, let me fix that

@egamma

Copy link
Copy Markdown
Member

pushed a fix

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
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.

4 participants