MCPcopy Create free account
hub / github.com/CatMuse/HiNote / emitHighlightTextChange

Function emitHighlightTextChange

src/editor/EditorHighlightDecorations.ts:87–101  ·  view source on GitHub ↗
(
    plugin: HiNotePluginContext,
    file: TFile,
    storedHighlight: HiNote,
    currentHighlight: HiNote
)

Source from the content-addressed store, hash-verified

85}
86
87function emitHighlightTextChange(
88 plugin: HiNotePluginContext,
89 file: TFile,
90 storedHighlight: HiNote,
91 currentHighlight: HiNote
92): void {
93 if (storedHighlight.text === currentHighlight.text) return;
94
95 plugin.eventManager.emitHighlightUpdate(
96 file.path,
97 storedHighlight.text,
98 currentHighlight.text,
99 currentHighlight.id ?? storedHighlight.id ?? ''
100 );
101}

Callers 1

buildDecorationsMethod · 0.85

Calls 1

emitHighlightUpdateMethod · 0.80

Tested by

no test coverage detected