Skip to content

Commit

Permalink
microsoft#32508. Emmet only force tokenization only when it is cheap.
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed Aug 19, 2017
1 parent 791f59f commit 1a21c2c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export abstract class EmmetEditorAction extends EditorAction {

public static getLanguage(languageIdentifierResolver: ILanguageIdentifierResolver, editor: ICommonCodeEditor, grammars: IGrammarContributions) {
let position = editor.getSelection().getStartPosition();
editor.getModel().forceTokenization(position.lineNumber);
editor.getModel().tokenizeIfCheap(position.lineNumber);
let languageId = editor.getModel().getLanguageIdAtPosition(position.lineNumber, position.column);
let language = languageIdentifierResolver.getLanguageIdentifier(languageId).language;
let syntax = language.split('.').pop();
Expand Down

0 comments on commit 1a21c2c

Please sign in to comment.