diff --git a/src/extension.ts b/src/extension.ts
index 72a0eaf..b08553d 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -143,18 +143,26 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(disposable, registration);
+ function changeSession(node: ConnectionNode) {
+ currentConnection = node;
+ statusBarItem.text = node.name;
+ if (dbSession) {
+ dbSession.stdin.end();
+ dbSession = null;
+ }
+ }
+
vscode.commands.registerCommand('selectConnection', (node: ConnectionNode) => {
- vscode.window.showInformationMessage(`You want to change the connection to '${node.name}'. Sure?`, 'Yes')
- .then( (selection) => {
- if (selection == 'Yes') {
- currentConnection = node;
- statusBarItem.text = node.name;
- if (dbSession) {
- dbSession.stdin.end();
- dbSession = null;
+ if (!dbSession) {
+ changeSession(node)
+ } else {
+ vscode.window.showInformationMessage(`You want to change the connection to '${node.name}'. Sure?`, 'Yes')
+ .then( (selection) => {
+ if (selection == 'Yes') {
+ changeSession(node);
}
- }
- }, (reason) => {})
+ }, (reason) => {})
+ }
})
}
diff --git a/src/syntaxes/frog-runner.tmLanguage b/src/syntaxes/frog-runner.tmLanguage
index 758b1d8..9c6657d 100644
--- a/src/syntaxes/frog-runner.tmLanguage
+++ b/src/syntaxes/frog-runner.tmLanguage
@@ -19,6 +19,30 @@
name
string.quoted
+
+ match
+ Query successful.
+ name
+ keyword
+
+
+ match
+ Exception.*
+ name
+ invalid.illegal
+
+
+ match
+ Errors found:.*
+ name
+ invalid.illegal
+
+
+ match
+ ^\d+:.*
+ name
+ invalid.illegal
+
\ No newline at end of file