This repository was archived by the owner on Mar 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -108,37 +108,37 @@ def run (self):
108108class StShowRecords (sublime_plugin .WindowCommand ):
109109 def run (self ):
110110 if not ST .conn :
111- showConnectionMenu ()
111+ ST . showConnectionMenu ()
112112 return
113113
114- Window ().show_quick_panel (ST .tables , lambda index : ST .conn .getTableRecords (ST .tables [index ], ST .display ))
114+ Window ().show_quick_panel (ST .tables , lambda index : ST .conn .getTableRecords (ST .tables [index ], ST .display ) if index != - 1 else None )
115115
116116class StDescTable (sublime_plugin .WindowCommand ):
117117 def run (self ):
118118 if not ST .conn :
119- showConnectionMenu ()
119+ ST . showConnectionMenu ()
120120 return
121121
122- Window ().show_quick_panel (ST .tables , lambda index : ST .conn .getTableDescription (ST .tables [index ], ST .display ))
122+ Window ().show_quick_panel (ST .tables , lambda index : ST .conn .getTableDescription (ST .tables [index ], ST .display ) if index != - 1 else None )
123123
124124class StHistory (sublime_plugin .WindowCommand ):
125125 def run (self ):
126126 if not ST .conn :
127- showConnectionMenu ()
127+ ST . showConnectionMenu ()
128128 return
129129
130130 if len (History .queries ) == 0 :
131131 sublime .message_dialog ('History is empty.' )
132132 return
133133 try :
134- Window ().show_quick_panel (History .queries , lambda index : ST .conn .execute (History .get (index ), ST .display ))
134+ Window ().show_quick_panel (History .queries , lambda index : ST .conn .execute (History .get (index ), ST .display ) if index != - 1 else None )
135135 except Exception :
136136 pass
137137
138138class StExecute (sublime_plugin .WindowCommand ):
139139 def run (self ):
140140 if not ST .conn :
141- showConnectionMenu ()
141+ ST . showConnectionMenu ()
142142 return
143143
144144 query = Selection .get ()
Original file line number Diff line number Diff line change @@ -196,7 +196,6 @@ def formatSql(edit):
196196 if region .empty ():
197197 selectedRegion = sublime .Region (0 , View ().size ())
198198 selection = View ().substr (selectedRegion )
199- print (Utils .formatSql (selection ))
200199 View ().replace (edit , selectedRegion , Utils .formatSql (selection ))
201200 View ().set_syntax_file ("Packages/SQL/SQL.tmLanguage" )
202201 else :
You can’t perform that action at this time.
0 commit comments