Skip to content

Commit

Permalink
improve: show current db in status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
mercurykd committed Mar 31, 2022
1 parent 6070041 commit ab75422
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions SQLTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,6 @@ def createConnection(connectionName, config, settings, callback=None):
settingsConnection = config.get('cli_options', {})
Utils.merge({'cli_options':settingsConnection}, settings)
ST.conn = Connection(connectionName, config, settings=settings)
views = Window().views()
for view in views:
view.set_status('db', 'db: ' + connectionName + ' ')
except FileNotFoundError as e:
# use only first line of the Exception in status message
Window().status_message(__package__ + ": " + str(e).splitlines()[0])
Expand Down Expand Up @@ -397,6 +394,10 @@ def loadConnectionData(callback=None):
if not ST.conn:
return

views = Window().views()
for view in views:
view.set_status('db', 'db: ' + ST.conn.name + ' ')

def afterAllDataHasLoaded():
ST.completion = Completion(ST.tables, ST.columns, ST.functions, settings=settingsStore)
logger.info('completions loaded')
Expand Down

0 comments on commit ab75422

Please sign in to comment.