Skip to content

Commit

Permalink
fix(document): no await for clearHighlight
Browse files Browse the repository at this point in the history
  • Loading branch information
chemzqm committed Aug 23, 2018
1 parent 424b969 commit 518d99e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/model/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ export default class Document {
srcId = await buffer.addHighlight({ srcId, hlGroup: '', line: 0, colStart: 0, colEnd: 0 })
this.srcId = srcId
} else {
await buffer.clearHighlight({ srcId })
buffer.clearHighlight({ srcId })
}
for (let hl of highlights) {
let hlGroup = hl.kind == DocumentHighlightKind.Text
Expand Down Expand Up @@ -494,7 +494,7 @@ export default class Document {
public async clearHighlight(): Promise<void> {
let { srcId, buffer } = this
if (srcId) {
await buffer.clearHighlight({ srcId })
buffer.clearHighlight({ srcId })
}
}
}

0 comments on commit 518d99e

Please sign in to comment.