execute command disabled, when query has not connection

This commit is contained in:
Jan Prochazka
2021-05-06 09:43:32 +02:00
parent cd7edcb443
commit 0b8add848a
2 changed files with 10 additions and 1 deletions

View File

@@ -27,6 +27,7 @@
execute: true,
toggleComment: true,
findReplace: true,
executeAdditionalCondition: () => getCurrentEditor()?.hasConnection(),
});
</script>
@@ -121,6 +122,10 @@
return tabid;
}
export function hasConnection() {
return !!conid;
}
export async function execute() {
if (busy) return;
executeNumber++;