Add copy/paste to query tab and database list

This commit is contained in:
ProjectInfinity
2024-03-13 23:59:02 +01:00
parent 1080147085
commit 10a916bce6
4 changed files with 50 additions and 2 deletions

View File

@@ -575,6 +575,7 @@ export function registerFileCommands({
findReplace = false,
undoRedo = false,
executeAdditionalCondition = null,
copyPaste = false,
}) {
if (save) {
registerCommand({
@@ -645,6 +646,25 @@ export function registerFileCommands({
});
}
if(copyPaste) {
registerCommand({
id: idPrefix + '.copy',
category,
name: 'Copy',
keyText: 'CtrlOrCommand+C',
testEnabled: () => getCurrentEditor() != null,
onClick: () => getCurrentEditor().copy(),
});
registerCommand({
id: idPrefix + '.paste',
category,
name: 'Paste',
keyText: 'CtrlOrCommand+V',
testEnabled: () => getCurrentEditor() != null,
onClick: () => getCurrentEditor().paste(),
})
}
if (findReplace) {
registerCommand({
id: idPrefix + '.find',