Renamed some functions, fixed some throws
This commit is contained in:
@@ -122,7 +122,9 @@
|
||||
// Move cursor to the match
|
||||
const view = app.workspace.getActiveViewOfType(MarkdownView)
|
||||
if (!view) {
|
||||
throw new Error('OmniSearch - No active MarkdownView')
|
||||
// Not an editable document, so no cursor to place
|
||||
return
|
||||
// throw new Error('OmniSearch - No active MarkdownView')
|
||||
}
|
||||
|
||||
const offset = groupedOffsets[selectedIndex] ?? 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
$: reg = stringsToRegex(note.foundWords)
|
||||
$: matches = Search.getMatches(note.content, reg)
|
||||
$: cleanedContent = makeExcerpt(note.content, note.matches[0]?.offset ?? -1)
|
||||
$: glyph = cacheManager.getNoteFromCache(note.path)?.doesNotExist
|
||||
$: glyph = cacheManager.getNoteFromMemCache(note.path)?.doesNotExist
|
||||
$: title = settings.showShortName ? note.basename : note.path
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user