Skip to content

Commit

Permalink
chore: quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
devcatalin committed Jun 21, 2023
1 parent efc29ad commit 011ebc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/editor/editor.instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ export function recreateEditorModel(editor: monaco.editor.ICodeEditor, text: str
const kindMatch = text.match(/kind:\s*(\w+)/);
if (kindMatch?.length === 1) {
currentResourceKind = kindMatch[1];
} else {
currentResourceKind = undefined;
}

isRecreatingModel = true;
Expand Down Expand Up @@ -178,7 +180,6 @@ export const clearEditorDecorations = () => {

monaco.languages.registerHoverProvider('yaml', {
provideHover: (model, position) => {
// We're sending this event on any hover because this method might be triggered by a hover created by Monaco itself
const positionHovers = editorHovers.filter(hover => isPositionInRange(position, hover.range));
if (positionHovers.length === 0) {
trackEvent('editor/hover', {resourceKind: currentResourceKind});
Expand Down

0 comments on commit 011ebc8

Please sign in to comment.