Skip to content
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
2 changes: 1 addition & 1 deletion src/vs/workbench/parts/emmet/node/actions/updateTag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class UpdateTagAction extends EmmetEditorAction {
}

private wrapAbbreviation(_emmet: any, tag) {
if (!_emmet.run('update_tag', this.editorAccessor, tag)) {
if (tag && !_emmet.run('update_tag', this.editorAccessor, tag)) {
this.editorAccessor.noExpansionOccurred();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class WrapWithAbbreviationAction extends EmmetEditorAction {
}

private wrapAbbreviation(_emmet: any, abbreviation) {
if (!_emmet.run('wrap_with_abbreviation', this.editorAccessor, abbreviation)) {
if (abbreviation && !_emmet.run('wrap_with_abbreviation', this.editorAccessor, abbreviation)) {
this.editorAccessor.noExpansionOccurred();
}
}
Expand Down
8 changes: 5 additions & 3 deletions src/vs/workbench/parts/emmet/node/editorAccessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ export class EditorAccessor implements emmet.Editor {
this.editor = editor;
}

public noExpansionOccurred(): void {
// return the tab key handling back to the editor
this.editor.trigger('emmet', Handler.Tab, {});
public noExpansionOccurred(actionId?: string): void {
// return the tab key handling back to the editor only for Expand Abbreviation command
if (actionId === 'editor.emmet.action.expandAbbreviation') {
this.editor.trigger('emmet', Handler.Tab, {});
}
}

public isEmmetEnabledMode(): boolean {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/parts/emmet/node/emmetActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export abstract class EmmetEditorAction extends EditorAction {

try {
if (!this.editorAccessor.isEmmetEnabledMode()) {
this.editorAccessor.noExpansionOccurred();
this.editorAccessor.noExpansionOccurred(this.id);
return;
}
this.updateEmmetPreferences(_emmet);
Expand Down