added: notes list in command palette

changed: do not bold grep result
This commit is contained in:
quenousimporte 2023-05-03 17:19:08 +02:00
parent ce39e4808e
commit ebf9b0ee99
1 changed files with 8 additions and 2 deletions

10
main.js
View File

@ -1652,7 +1652,7 @@ function showgrepresult(grepresult)
grepcontent.push("[[" + file + "]]");
for (var l in grepresult[file])
{
grepcontent.push("[" + l + "] " + grepresult[file][l].replace(new RegExp("(" + filter.value + ")", "gi"), "**$1**"));
grepcontent.push("[" + l + "] " + grepresult[file][l]);
}
grepcontent.push("");
}
@ -1706,7 +1706,9 @@ function commandpalette()
searchinlist(commands
.filter(c => !c.excludepalette)
.map(c => c.hint)
.concat(snippets.map(s => "Insert snippet: " + s.hint)))
.concat(snippets.map(s => "Insert snippet: " + s.hint))
.concat(list().map(t => "Open note: " + t))
)
.then(hint =>
{
var command = commands.find(c => c.hint == hint);
@ -1722,6 +1724,10 @@ function commandpalette()
insert(snippet.insert, snippet.cursor);
md.focus();
}
else if (hint.startsWith("Open note: "))
{
loadnote(hint.replace("Open note: ", ""));
}
}
});
}