#406 show/hide reult window

This commit is contained in:
Jan Prochazka 2022-11-10 12:35:25 +01:00
parent ed71ef312d
commit 9bcc61551c

View File

@ -17,6 +17,14 @@
testEnabled: () => getCurrentEditor()?.isSqlEditor(),
onClick: () => getCurrentEditor().insertSqlJoin(),
});
registerCommand({
id: 'query.toggleVisibleResultTabs',
category: 'Query',
name: 'Toggle visible result tabs',
keyText: 'CtrlOrCommand+Shift+R',
testEnabled: () => !!getCurrentEditor(),
onClick: () => getCurrentEditor().toggleVisibleResultTabs(),
});
registerFileCommands({
idPrefix: 'query',
category: 'Query',
@ -144,6 +152,10 @@
return !!conid && (!$connection?.isReadOnly || driver?.readOnlySessions);
}
export function toggleVisibleResultTabs() {
visibleResultTabs = !visibleResultTabs;
}
async function executeCore(sql, startLine = 0) {
if (busy) return;
if (!sql || !sql.trim()) {
@ -279,6 +291,8 @@
{ divider: true },
{ command: 'query.find' },
{ command: 'query.replace' },
{ divider: true },
{ command: 'query.toggleVisibleResultTabs' },
];
}